### Installing React Bootstrap and Bootstrap Source: https://github.com/packtpublishing/react-design-patterns-and-best-practices/blob/master/chapter-03/reusable-components/README.md Provides the npm commands to install React Bootstrap and Bootstrap CSS. This is a prerequisite for integrating Bootstrap styling and components into a React application. ```bash npm install react-bootstrap --save npm install bootstrap@3 --save ``` -------------------------------- ### Surge Deployment Example Source: https://github.com/packtpublishing/react-design-patterns-and-best-practices/blob/master/chapter-03/reusable-components/README.md This example illustrates the interactive process of deploying a React project build folder to Surge, including user authentication, project path specification, and the final success message with the deployed domain. ```sh email: email@domain.com password: ******** project path: /path/to/project/build size: 7 files, 1.8 MB domain: create-react-app.surge.sh upload: [====================] 100%, eta: 0.0s propagate on CDN: [====================] 100% plan: Free users: email@domain.com IP Address: X.X.X.X Success! Project is published and running at create-react-app.surge.sh ``` -------------------------------- ### Run Development Server Source: https://github.com/packtpublishing/react-design-patterns-and-best-practices/blob/master/chapter-03/reusable-components/README.md Starts the React development server, typically at http://localhost:3000. It enables hot reloading for immediate feedback on code changes and displays linting errors directly in the console. ```bash npm start ``` -------------------------------- ### Install npm dependency Source: https://github.com/packtpublishing/react-design-patterns-and-best-practices/blob/master/chapter-03/reusable-components/README.md This command demonstrates how to install a new library or package as a dependency for your React project using npm. The `--save` flag ensures that the dependency is added to your project's package.json file. ```bash npm install --save ``` -------------------------------- ### Install ESLint and related packages globally Source: https://github.com/packtpublishing/react-design-patterns-and-best-practices/blob/master/chapter-03/reusable-components/README.md This command installs essential ESLint packages globally, including ESLint itself, babel-eslint, and several popular ESLint plugins for React, import, accessibility, and Flowtype. These are required for editor integration. ```bash npm install -g eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-flowtype ``` -------------------------------- ### Import and Export ES6 Components in React Source: https://github.com/packtpublishing/react-design-patterns-and-best-practices/blob/master/chapter-03/reusable-components/README.md This example illustrates the use of ES6 modules in React for importing and exporting components. It shows how to define a component using a class and export it as a default export, and how to import it into another component. ```javascript import React, { Component } from 'react'; class Button extends Component { render() { // ... } } export default Button; // Don’t forget to use export default! ``` ```javascript import React, { Component } from 'react'; import Button from './Button'; // Import a component from another file class DangerButton extends Component { render() { return