Category : react-native

I’m using react-native-background-timer getting error android as well as ios while calling function BackgroundTimer.setTimeout useEffect(() => { let timeId = BackgroundTimer.setTimeout(() => { BackgroundTimer.start(); AppContext.UpdateCart([]); SecureStorage.setItem("CART", []); }, 20 * 60 *1000); }, []); Source: Ask Javascript..

Read more

I am a react beginner learner. I do try to create the first project in react. But I can not output my project. My react index.js is: import React from ‘react’; import ReactDOM from ‘react-dom’; import App from ‘./App’; ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById(‘root’) ); App.js is: import react from ‘react’; import heard_title from ..

Read more

I am following this tutorial on uploading photos to Firebase in React Native and have it all set up using ‘react-native-image-picker’ and ‘launchImageLibrary’ (instead of the ‘showImagePicker’ in the tutorial as it is no longer in use) however when I click the ‘Upload Image’ button I get this error/warning: My UploadScreen.js file is as follows: ..

Read more

After struggling to upload image to the Firebase storage and save it to the user Firebase firestore, I finally succeeded in achieving that. Here’s how I did it: const [image, setImage] = useState(null); const [userData, setUserData] = useState(""); const [uploading, setUploading] = useState(""); const getPermission = async () => { if (Platform.OS !== "web") { ..

Read more

I’m currently working on a React-Native project. I’m building an app using Firebase. Let’s classify this as a social media app. Using the firebase cloud function, I’m trying put all the users into a single document. For that, using the onCreate event, im listening to every new documents created within the collection "users", and each ..

Read more