We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentc18ebeb commit9b02c9fCopy full SHA for 9b02c9f
README.md
@@ -40,8 +40,9 @@ juicr.action("count", (amount, _state) => {
40
```
41
3) Listen to state changes. You can either listen to a single property, an array or use`*` to listen to all changes:
42
```javascript
43
-juicr.listen("count", (changedState,_state)=> {
44
-console.log(changedState.count)
+juicr.listen("*", (changedState,_state)=> {
+document.body.innerHTML=changedState.count
45
+/* or your front end library update function e.g. this.setState({ ...changedState })*/
46
})
47
48
4) Dispatch actions to the Juicr:
@@ -52,7 +53,7 @@ setInterval(() => {
52
53
54
Play with this example in [CodePen](https://codepen.io/alexfoxy/pen/gyNaYw).
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
57
58
## API
59
####`newJuicr({ initialState={}, dev=false })`