diff --git a/README.md b/README.md index 5e93ceb91..77ff78f54 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

-

Easy peasy redux-powered state management

+

Easy peasy state for React

[![npm](https://img.shields.io/npm/v/easy-peasy.svg?style=flat-square)](http://npm.im/easy-peasy) [![MIT License](https://img.shields.io/npm/l/easy-peasy.svg?style=flat-square)](http://opensource.org/licenses/MIT) @@ -9,7 +9,7 @@ [![Codecov](https://img.shields.io/codecov/c/github/ctrlplusb/easy-peasy.svg?style=flat-square)](https://codecov.io/github/ctrlplusb/easy-peasy) ```javascript -import { createStore } from 'easy-peasy'; +import { EasyPeasyProvider, createStore, useStore, useAction } from 'easy-peasy'; const store = createStore({ count: 1, @@ -18,10 +18,17 @@ const store = createStore({ } }); -store.dispatch.inc(); +const Counter = () => { + const count = useStore(state => state.count) + const inc = useAction(actions => actions.inc) + return (