Skip to Content
Serverless Web Applications with React and Firebase
book

Serverless Web Applications with React and Firebase

by Mayur Tanna, Harmeet Singh
April 2018
Intermediate to advanced content levelIntermediate to advanced
284 pages
6h 43m
English
Packt Publishing
Content preview from Serverless Web Applications with React and Firebase

Props and state

Before we go into the practical, we should know what is state and what is props in React. In ReactJs, components translate your raw data into Rich HTML with the help of JSX, the props and state together build with that raw data to keep your UI consistent. Okay, let's identify what exactly it is:

  • Props and state are both plain JS objects.

  • They are triggered by a render update.

  • React manages the component state by calling setState (data, callback). This method will merge data into this state and rerenders the component to keep our UI up to date. For example, the state of the drop-down menu (visible or hidden).

  • React component props (properties) that don't change over time, for example, drop-down menu items. Sometimes ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Web Applications with Firebase

Building Web Applications with Firebase

Gareth Brown
React Native in Action

React Native in Action

nader dabit, Nickie Buckner

Publisher Resources

ISBN: 9781788477413Supplemental Content