Using React-Bootstrap

React-Bootstrap is an open source JavaScript framework rebuilt for React. It's similar to Bootstrap where we have ready-to-use components to integrate with React. It's purely reimplementation of Bootstrap framework components to React. React-Bootstrap has no dependency on any other framework, as Bootstrap JS has a dependency on jQuery. By using React-Bootstrap, we can ensure that there won't be external JavaScript calls to render the component that might be incompatible or extra efforts with the ReactDOM.render. However, we can still achieve the same functionality and look and feel as
Twitter Bootstrap, but with much cleaner and less code.

Let's see how we can create our Add Ticket Form component with React-Bootstrap.

First, follow the steps mentioned here to configure React-Bootstrap in your project:

  1. Install the React bootstrap npm package by running this below command
    • npm install --save react-bootstrap
  2. If you are using the create-react-app CLI, we don't need to worry about bootstrap CSS; it's already there, we don't need to include.
  1. Now by using import keyword we need to add the reference of react-bootstrap components in react application.
    For Example:
    • import Button from 'react-bootstrap/lib/Button'; 
      // or
      import { Button } from 'react-bootstrap';
..................Content has been hidden....................

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