Sunday, April 1st, 2018
When creating websites using React, a router package will need to be installed so that the React application can handle requests within the browser. In order to go about using React Router v4, the react-router-dom package should be installed. For simplicity, routing will be added to the create-react-app application. To start with, create the React…
Sunday, December 17th, 2017
As seen briefly in the JSX elements post, rendering React elements in the DOM can be achieved using the render() function of the ReactDOM global. The function takes two parameters: an element, which can contain multiple nested children elements, and a node, which is usually the root DOM node used to render the content within.…
Sunday, December 17th, 2017
Whilst you can define react elements within a pair of <script> nodes in an HTML document, it is recommended to use components. React components allow you to split the UI that you write into modular, reusable pieces of code. The most simplest example of a component can be a JavaScript function that accepts a properties…