Things to remember

Observe the following list of points to remember:

  • Before you start working on React, always remember that it is just a view library, not an MVC framework.
  • It is advisable to have a small length of the component to deal with classes and modules; it also makes life easy when it comes to code understanding, unit testing, and long-running maintenance of a component.
  • React has introduced functions of props in its 0.14 version which is recommended to use. It is also known as a functional component that helps to split your component.
  • To avoid a painful journey while dealing with a React-based app, please don't use too many states.
  • As I said earlier, React is only a view library, so to deal with the rendering part I recommend using Redux rather than Flux.
  • If you want to have more type safety then always use PropTypes, which also helps to catch bugs early and acts as a document.
  • I recommend the use of the shallow rendering method to test React components, which allows rendering single components without touching their child components.
  • While dealing with large React applications, always use webpack, NPM, ES6, JSX, and Babel to complete your application.
  • If you want to delve into React's applications and its elements, you can use the Redux-dev tools.
..................Content has been hidden....................

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