Provide Firebase in React
Now, we'll learn how to use Firebase in our React application.
We'll cover the following...
In the previous lessons, we created a Firebase class but we have not used it in our React application yet. In this lesson, we’ll connect Firebase with the React world.
Different Approaches
The simpler approach would be to create a Firebase instance with the Firebase class and then import the instance (or class) in every React component where it’s needed, but that is not a good approach for two reasons:
- It will be more difficult to test our React components.
- Firebase should only be initialized
Access this course and 1400+ top-rated courses and projects.