Skip to content

Commit 17a0255

Browse files
committed
docs: automatic rerender
1 parent 6287ea3 commit 17a0255

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ If a `loader` is present, it will be called with the missing keys and those keys
146146
}
147147
```
148148

149+
#### Automatic rerender
150+
151+
If a component calls `get()` for some keys it subscribes to further changes to that entry.
152+
When this or any other components alters that entry through one of the writing methods described below,
153+
the component automatically rerenders.
154+
149155
### Set
150156

151157
#### Set a single value
@@ -217,7 +223,8 @@ You can set values in the react cache but not in IndexedDB:
217223
```
218224

219225
#### Filter entries per callback
220-
Clears the cache and also deletes some data from IndexedDB.
226+
227+
Deletes some data from cache and IndexedDB.
221228
```js
222229
const { clear } = useCached()
223230
clear(({data, meta}) => meta.someMetaField > 2) // this will remove all entries with meta.someMetaField > 2

0 commit comments

Comments
 (0)