Manage Users with Firebase's Real-time Database in React

In this lesson, we will manage the users in our React app using Firebase's Real-time Database.

In the last lesson, we created two new references. One for a specific user and the other for an object of all the users.

Let’s pick up where we left off. We will use these references in our React components to create and get users from Firebase’s Real-time database.

Creating a User

The best place to add user creation is the SignUpForm component, as it is the most natural place to save users after they have signed up via the Firebase authentication API. We add another API request to create a user when the sign-up is successful.

In src/components/SignUp/index.js file, we add the following:

Get hands-on with 1200+ tech skills courses.