Chapter 8. ReactJS API

In the previous chapters, we learned about the React router which allows us to create single-page applications and ensures our UI is in sync with URLs. We have also covered the advantages of the React router, dynamic route matching, and how we can configure our components in the router to be rendered in DOM with matching URLs. With the React router browser history feature, the user can navigate backwards/forwards and restore the previous state of the application. Now we are going to check how we can integrate React API with other APIs such as Facebook, Twitter, and Git.

React Top-Level API

When we are talking about the React API, it's the first step to getting into the React library. Different uses of React will provide different outputs. For example, using the React script tag will make top-level APIs available on the React global, using ES6 with npm will allow us to write import React from 'react', and using ES5 with npm will allow us to write var React = require('react'), so there are multiple ways to initialize React with different features.

..................Content has been hidden....................

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