From 3b3ff6d524590397e1e9cafa2aa67dbe20186565 Mon Sep 17 00:00:00 2001 From: Mark Croxton Date: Mon, 4 Dec 2023 16:38:56 +0000 Subject: [PATCH] Update README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b601b79..f6e430b 100644 --- a/README.md +++ b/README.md @@ -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', { @@ -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)