

What’s a const? A const is a read-only reference to a value, which makes sense here, because you don’t want to ever override the value of Firebase. Then right above the component, initialize Firebase with your config values:Ĭonst firebaseApp = firebase.initializeApp(firebaseConfig) Open and add the following line to the top:
#Native access no compatible update found install#
To install Firebase, run the following command at the root of the project. React Native manages dependencies through npm. With the build setup done, let’s get Firebase up and running. And if you’re an iOS developer, or really any kind of developer, you know how cool that is. React Native comes with hot-reloading, which means you can make an edit to the code,, and then hit Cmd+R and see your changes instantly update. This should launch the Simulator, and you should see the boilerplate screen. To build a React Native project, run the following command: Open the main folder in your favorite editor. Then finally, you can begin your project with the CLI command: react-native init GroceryApp # or whatever you want Once those tools have been installed, run the following commands: brew install watchman The React Native team recommends using nvm to manage your node versions (and I do too). If you already have React Native set up, you can skip this section.įirst, you’ll need Homebrew, which is easy to install. Getting started with React Native is fairly easy, but there are some gotchas you should be aware of. Otherwise, let's go through this step-by-step. If you want to dive right into the code, you can check out the final GitHub repo here. Using React Native you can build real native apps with just JavaScript. It’s a perfect fit.Īnd with React Native, app development became a lot easier for JavaScript developers. Firebase synchronizes application state, and React re-renders the application UI based on state changes. UPDATE: We updated this tutorial for the Firebase 3.1.0 SDK which now supports the Firebase Realtime Database and Firebase Authentication.
