Skip to content

Commit 754eabd

Browse files
syabrogitbook-bot
authored andcommitted
GitBook: [master] one page modified
1 parent 7918e95 commit 754eabd

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# React Shared State
22

3-
<a href="https://travis-ci.org/soofty/react-shared-state"><img src="https://travis-ci.org/soofty/react-shared-state.svg?branch=master" /></a>
3+
## React Shared State
4+
5+
[![](https://travis-ci.org/soofty/react-shared-state.svg?branch=master)](https://travis-ci.org/soofty/react-shared-state)
46

57
Very simple shared state for your react app.
68

79
{% code-tabs %}
810
{% code-tabs-item title="app.js" %}
9-
```javascript
11+
```jsx
1012
import React from 'react'
1113
import { createProvider } from 'react-shared-state'
1214

1315
const SimpleProvider = createProvider('simple_provider')
14-
16+
1517
const HelloComponent = (props) => {
1618
return <div>
1719
<h1> Hello, {props.name} </h1>
@@ -34,28 +36,30 @@ export function App() {
3436
{% endcode-tabs-item %}
3537
{% endcode-tabs %}
3638

37-
## Install
38-
```yarn add react-shared-state```
39-
or
40-
```npm install react-shared-state```
39+
### Install
40+
41+
`yarn add react-shared-state`
42+
or
43+
`npm install react-shared-state`
44+
45+
### Quickstart
4146

42-
## Quickstart
43-
https://soofty.gitbook.io/react-shared-state/quickstart
44-
45-
## Documentation
46-
https://soofty.gitbook.io/react-shared-state/documentation
47+
[https://soofty.gitbook.io/react-shared-state/quickstart](https://soofty.gitbook.io/react-shared-state/quickstart)
4748

48-
## Live example
49-
https://codesandbox.io/s/wy308n0k88
49+
### Documentation
5050

51+
[https://soofty.gitbook.io/react-shared-state/documentation](https://soofty.gitbook.io/react-shared-state/documentation)
5152

52-
# 0.1.x => 0.2.x migration guide
53+
### Live example
54+
55+
[https://codesandbox.io/s/wy308n0k88](https://codesandbox.io/s/wy308n0k88)
56+
57+
## 0.1.x =&gt; 0.2.x migration guide
5358

5459
**Important!** 0.2 has changed `connect`'s behavior.
5560

5661
1. mapStateToProps now accepts `store` instead of `store.state` as first argument
5762
2. `connect` no longer passes `store` by it's name to a component
5863
3. Preferable way to use connect is `YourProvider.connect` instead of building custom function
59-
4. Changed Typescript's generics order from TOuterProps, TInnerProps to TInnerProps, TOuterProps (recompose format)
60-
64+
4. Changed Typescript's generics order from TOuterProps, TInnerProps to TInnerProps, TOuterProps \(recompose format\)
6165

0 commit comments

Comments
 (0)