Skip to content

Commit 289ef99

Browse files
sveinpgmarkerikson
authored andcommitted
#1031 Added metadata to provider markdown and updated the sidebar (#1034)
Added missing markdown document to sidebar and updated it's structure.
1 parent 2e4465a commit 289ef99

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

docs/api/Provider.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
---
2+
id: provider
3+
title: Provider
4+
sidebar_label: Provider
5+
---
6+
17
# `<Provider />`
28

39
## Overview
410

5-
The `<Provider />` makes the Redux `store` available to any nested components that have been wrapped in the `connect()` function.
11+
The `<Provider />` makes the Redux `store` available to any nested components that have been wrapped in the `connect()` function.
612

713
Since any React component in a React-Redux app can be connected, most applications will render a `<Provider>` at the top level, with the entire app’s component tree inside of it.
814

@@ -15,26 +21,26 @@ Note: If you really need to, you can manually pass `store` as a prop to a connec
1521
`store` (Redux Store)
1622
The single Redux `store` in your application.
1723

18-
`children` (ReactElement)
19-
The root of your component hierarchy.
24+
`children` (ReactElement)
25+
The root of your component hierarchy.
2026

2127

2228
### Example Usage
2329

24-
In the example below, the `<App />` component is our root-level component. This means it’s at the very top of our component hierarchy.
30+
In the example below, the `<App />` component is our root-level component. This means it’s at the very top of our component hierarchy.
2531

26-
**Vanilla React Example**
32+
**Vanilla React Example**
2733

2834
```js
2935
import React from 'react';
3036
import ReactDOM from 'react-dom';
3137
import { Provider } from 'react-redux';
32-
38+
3339
import { App } from './App';
3440
import createStore from './createReduxStore';
35-
41+
3642
const store = createStore();
37-
43+
3844
ReactDOM.render(
3945
<Provider store={store}>
4046
<App />
@@ -51,14 +57,14 @@ In the example below, the `<App />` component is our root-level component. This
5157
import ReactDOM from 'react-dom';
5258
import { Provider } from 'react-redux';
5359
import { Router, Route } from 'react-router-dom';
54-
60+
5561
import { App } from './App';
5662
import { Foo } from './Foo';
5763
import { Bar } from './Bar';
5864
import createStore from './createReduxStore';
59-
65+
6066
const store = createStore();
61-
67+
6268
ReactDOM.render(
6369
<Provider store={store}>
6470
<Router history={history}>
@@ -71,5 +77,3 @@ In the example below, the `<App />` component is our root-level component. This
7177
document.getElementById('root')
7278
)
7379
```
74-
75-

website/sidebars.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"docs": {
3-
"Docs": ["getting-started", "api", "troubleshooting"]
3+
"Introduction": ["getting-started"],
4+
"API Reference": ["api", "api/provider"],
5+
"Guides": ["troubleshooting"]
46
}
57
}

0 commit comments

Comments
 (0)