1React is a declarative, efficient, and flexible JavaScript library for
2building user interfaces or UI components. It lets you compose complex UIs
3from small and isolated pieces of code called “components”.
4
5It is used by large, established companies and newly-minted startups
6alike (Netflix, Airbnb, Instagram, and the New York Times, to name a few).
7React brings many advantages to the table, making it a better choice
8than other frameworks like Angular.js.
1step : 1 // First install firebase-tools
2npm install firebase-tools -g
3
4step : 2 // login in your gmail account and then create one project.
5
6step : 3 // Then go to your project directory
7firebase login // enter details
8
9step : 4
10npm run build
11
12step : 5
13firebase init
14
15// ? What do you want to use as your public directory? build
16// ? Configure as a single-page app (rewrite all urls to /index.html)? Yes
17// ? Set up automatic builds and deploys with GitHub? No
18// ? File build/index.html already exists. Overwrite? No
19
20step : 6 // your project is now deployed
21firebase deploy
22
23step : 7
24// go to firebase account
25// select your project
26// goto Hoisting
27
1class ShoppingList extends React.Component {
2 render() {
3 return (
4 <div className="shopping-list">
5 <h1>Shopping List for {this.props.name}</h1>
6 <ul>
7 <li>Instagram</li>
8 <li>WhatsApp</li>
9 <li>Oculus</li>
10 </ul>
11 </div>
12 );
13 }
14}
15
16// Example usage: <ShoppingList name="Mark" />