Chapter 7

  1. Components are the basic building blocks of React apps. The React component can be created using a JavaScript function or the ES6 class.
  2. The props and state are the input data for rendering the component. They are JavaScript objects, and the component is rerendered when the props or state change.
  3. The data flow goes from the parent component to the child.
  4. The components that only have props are called stateless components. The components that have both props and a state are called stateful components.
  5. JSX is the syntax extension for JavaScript, and it is recommended that you use it with React.
  6. The component life cycle methods are executed at certain phases of the component's life cycle.
  7. Handling events in React is similar to handling DOM element events. The difference in React is that event naming uses the camelCase naming convention—for example, onClick or onSubmit.
  8. We will often want to invoke a JavaScript function that has access to form data after the form submission. Therefore, we have to disable the default behavior using the preventDefault() function. You can use the input field's onChange event handler to save the values from the input field to the state.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.97.224