Skip to content

Commit a1d3a58

Browse files
committed
Move installing a dependency to its own file
1 parent b4b3581 commit a1d3a58

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
id: installing-a-dependency
3+
title: Installing a Dependency
4+
---
5+
6+
The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`:
7+
8+
```sh
9+
npm install --save react-router-dom
10+
```
11+
12+
Alternatively you may use `yarn`:
13+
14+
```sh
15+
yarn add react-router-dom
16+
```
17+
18+
This works for any library, not just `react-router-dom`.

docusaurus/docs/user-guide.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ You can find the most recent version of this guide [here](https://github.com/fac
1111

1212
## Table of Contents
1313

14-
- [Installing a Dependency](#installing-a-dependency)
1514
- [Importing a Component](#importing-a-component)
1615
- [Code Splitting](#code-splitting)
1716
- [Adding a Stylesheet](#adding-a-stylesheet)
@@ -50,22 +49,6 @@ You can find the most recent version of this guide [here](https://github.com/fac
5049
- [Advanced Configuration](#advanced-configuration)
5150
- [Alternatives to Ejecting](#alternatives-to-ejecting)
5251

53-
## Installing a Dependency
54-
55-
The generated project includes React and ReactDOM as dependencies. It also includes a set of scripts used by Create React App as a development dependency. You may install other dependencies (for example, React Router) with `npm`:
56-
57-
```sh
58-
npm install --save react-router-dom
59-
```
60-
61-
Alternatively you may use `yarn`:
62-
63-
```sh
64-
yarn add react-router-dom
65-
```
66-
67-
This works for any library, not just `react-router-dom`.
68-
6952
## Importing a Component
7053

7154
This project setup supports ES6 modules thanks to Webpack.<br>

docusaurus/website/sidebars.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
"developing-components-in-isolation",
1717
"analyzing-the-bundle-size"
1818
],
19-
"How-to": ["changing-the-page-title"],
19+
"How-to": [
20+
"changing-the-page-title",
21+
"installing-a-dependency"
22+
],
2023
"Testing": ["running-tests", "debugging-tests"],
2124
"Deployment": ["publishing-components-to-npm", "deployment"],
2225
"Support": [

0 commit comments

Comments
 (0)