Skip to content

Commit

Permalink
修改文档中 Store 的示例
Browse files Browse the repository at this point in the history
  • Loading branch information
promer94 authored and treenewtreenew committed Oct 8, 2019
1 parent 3dcaa8a commit 3ccc1ff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,12 @@ import { init } from "rectx";

const { Put, Ctx, Auto,Store } = init({ foo: 1, bar: 1 });

const store = Store();

console.log(store);// { foo: 1, bar: 1 }
console.log(Store());// { foo: 1, bar: 1 }

Put(state => state.foo = 2);

console.log(store);// { foo: 2, bar: 1 }
console.log(Store());// { foo: 2, bar: 1 }

```

Expand Down

0 comments on commit 3ccc1ff

Please sign in to comment.