REACT

React is one of the most sought-after web development skills today. Popular websites that use React include Facebook, Instagram, Netflix, Uber, Reddit, Netflix, Airbnb, The New York Times, and BBC. Mastering this essential technology improves the developer's coding proficiency to the next level, tremendously enhancing job prospects.

So what problem does React solve exactly? In a nutshell, React organizes the user interface into a hierarchy of reusable components that are updated intelligently. In the old days, to reuse code, some developers used the JQuery function $("#container").html(code) to load HTML snippets into an element, while some other developers resorted to server-side rendering. However, such techniques can be relatively cumbersome and messy. React effectively uses XML-like JSX syntax to build encapsulated components (from HTML components and other React components), automatically re-rendering them if the states of the components change. During the last stage of the development, all the codes are obfuscated, minimized, bundled, and compiled into raw HTML, CSS, and JavaScript for deployment for the public users.

Although React is generally classified as a front-end technology, it is possible to render React components at the back-end too. As we will see, rendering the components at the server yields a few benefits such as refined SEO.

React has undergone a few major revisions since its birth. In contrast to the traditional 'Class' syntax, the latest React version uses a neater syntax that incorporates functional components with 'Hooks'. Almost everything achievable with the traditional Class syntax can be achieved by the Hooks syntax. The former syntax has been included in this book for the sake of completeness, but the Hooks syntax is the recommended style for new projects.

Additionally, this book goes beyond the basics of React and introduces to the reader equally essential related libraries and tools. Particularly, React Router allows you to host your app across different URLs, and React Native makes it possible to build native apps that can work offline and get uploaded to app stores such as Google Play Store and Apple App Store.