Key Points Every Programmer Should Remember About React.js

I’ve been using React.js for about 6 months now and have made a bit of effort to help out a few developers with React starter tips. I thought it would be a good idea to share them with everyone. These are all either things that I wish I’d known when I started out, or things that really helped me understand React.

I’m going to assume that you know the absolute basics. If the words component, props, or state are unfamiliar to you, then you might want to read the official Getting started or Tutorial pages.

Key Points to Remember About React.js:

  1. A ReactJS component should never change its props, they’re immutable. If a component has data that’s mutable, use the state object.
  2. The state object is internal to a component. It holds data which can change over time, ReactJS.
  3. Composition means combining smaller components to form a larger whole. You can combine components to create more complex components.
  4. React observes the virtual DOM for changes and automatically mutates browser DOM to match the virtual DOM.
  5. Components are the heart and soul of React. They are custom #reactjs elements that are extended with unique functionality and structure.
  6. Reactjs props can be thought of as a component’s options. They’re given as arguments to a component and look exactly like HTML attribute.
  7. The Virtual DOM is a JavaScript tree of React elements and components. React renders the virtualDOM to the browser to make the UI visible.
  8. JSX is a technique for creating React elements and components. JSX is transformed into JavaScript before running in the browser.
  9. Components are developer created React elements. Usually larger parts of the #UI which contain both the structure and functionality.
  10. React elements are JavaScript objects which represent HTML elements. They do not exist in the browser and represent elements like h1, div.
  11. Keys help React identify which items have changed, are added, or are removed. Keys should be given to the elements inside the array to give the elements a stable identity.