React Firebase
  • React Firebase
  • React Firebase Realtime Database
    • Setup
    • Usage
    • API
  • React Firebase Auth
    • Setup
    • Usage
    • API
  • React Firestore Database
    • Setup
    • Usage
    • API
  • Generate Firebase Data
    • Setup
    • Usage
  • Generate Firestore Data
    • Setup
    • Usage
  • Generate JSON Data
    • Setup
    • Usage
  • Guides
    • Build a React App with Firebase Auth and Realtime Database
      • Setup the development environment
      • Add React and React DOM
      • Add Firebase
      • Listen to auth
      • Adding Google and Anonymous Auth
      • Adding Data to your Realtime Database
      • Implementing the UI
      • Writing Data
      • Read Data
  • View Source
Powered by GitBook
On this page
  1. Guides
  2. Build a React App with Firebase Auth and Realtime Database

Add React and React DOM

Adding React and React DOM

PreviousSetup the development environmentNextAdd Firebase

Last updated 6 years ago

Now that we have a running website, let's start adding the dependencies we want to use for this project.

Install react and react-dom from NPM

yarn add react react-dom
# Add the community provided types for these libraries 
# (For typescript users only) 
yarn add -D @types/react @types/react-dom

And let's add a small React Component to the page

src/index.tsx
import * as React from "react";
import { render } from "react-dom";
const concept = "world";

const App = () => {
  return <div>Hello {concept}</div>;
};

render(<App />, document.getElementById("root"));

Our React app is ready.

Git Commit