Recent Posts

  • Using React Router v4

    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…

    View Post »

  • Rendering React Elements in the DOM

    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.…

    View Post »

  • React Components

    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…

    View Post »