Skip to content

Commit

Permalink
feat: intro example in readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
betula committed Jun 18, 2021
1 parent 2b79d07 commit 282b61e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ const App = observe(() => {
})
```

And you can use it together <sup>_[play on codesandbox](https://codesandbox.io/s/realar-readme-example-together-cppu6?file=/src/App.tsx)_</sup>
And you can use it together <sup>_[play on codesandbox](https://codesandbox.io/s/realar-readme-example-together-315r8?file=/src/App.tsx)_</sup>

```javascript
const counter = new Counter()
const store = value.from(() => counter.state)

const App = () => {
const state = useValue(() => store.val)
const store = value.from(() => counter.state)

return <p>{state}
export const App = observe(() => (
<p>
{store.val}
<button onClick={counter.inc}>+</button>
</p>
}
))
```


Expand Down Expand Up @@ -160,9 +160,7 @@ const App = () => {

### Articles

+ [Multiparadigm state manager for React by ~2 kB.](https://dev.to/betula/multiparadigm-state-manager-for-react-by-2-kb-4kh1)
+ [The light decision for React state 👋](https://dev.to/betula/new-minimalistic-react-state-manager-3o39)

+ [State manager of dream](https://dev.to/betula/state-manager-of-dream-5766-temp-slug-158417?preview=4b030f68851211fd02704f12d7742ce193a8f9c893afd1e4249b88023e14d57b1e5a8a02c4aaa924f22beb44c69bba20617a0523e952120eb97ef344)

### Installation

Expand Down

0 comments on commit 282b61e

Please sign in to comment.