Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b02c9f

Browse files
authored
Update README.md
1 parentc18ebeb commit9b02c9f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎README.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ juicr.action("count", (amount, _state) => {
4040
```
4141
3) Listen to state changes. You can either listen to a single property, an array or use`*` to listen to all changes:
4242
```javascript
43-
juicr.listen("count", (changedState,_state)=> {
44-
console.log(changedState.count)
43+
juicr.listen("*", (changedState,_state)=> {
44+
document.body.innerHTML=changedState.count
45+
/* or your front end library update function e.g. this.setState({ ...changedState })*/
4546
})
4647
```
4748
4) Dispatch actions to the Juicr:
@@ -52,7 +53,7 @@ setInterval(() => {
5253
```
5354
Play with this example in [CodePen](https://codepen.io/alexfoxy/pen/gyNaYw).
5455
55-
For use with React see #use-with-react--react-native
56+
For use with React see[Use with React & React Native](https://github.com/alexfoxy/juicr.js#use-with-react--react-native
5657
5758
## API
5859
####`newJuicr({ initialState={}, dev=false })`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp