Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
croxton committed Dec 4, 2023
1 parent 957ec68 commit 3b3ff6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Method called to update state. Only changes of state are required to be passed i
* `component`: shared by all instances of the same class, allowing them to communicate.
* `global`: shared by all components globally.

Use the `component` amd `global` scopes with caution: sharing scope has the potential to introduce memory leaks if you store large objects, references to dom nodes or forget to destroy state in `unmount()`.
Use the `component` and `global` scopes with caution: sharing scope has the potential to introduce memory leaks if you store large objects, references to dom nodes or forget to destroy state in `unmount()`.

```js
this.setState('local', {
Expand All @@ -216,7 +216,7 @@ this.setState('local', {
Retrieve state from the specified scope, optionally passing an object with a set of default values.

```js
let currentState = this.getState('component', { a: null, b:null });
let currentState = this.getState('component', { a:null, b:null });
```

#### stateChange(changes)
Expand Down

0 comments on commit 3b3ff6d

Please sign in to comment.