Skip to content

Commit

Permalink
chore(readme): Add setAll example (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
rozzilla authored Apr 19, 2024
1 parent 0add09c commit 752893f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ dist

# Stores VSCode versions used for testing VSCode extensions
.vscode-test
.vscode

# yarn v2
.yarn/cache
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ setImmediate(() => {
console.log('a', a())
console.log('b', b())
})

const c = memo("myKeyC");
const d = memo("myKeyD");

setAll({
[c.key]: 42,
[d.key]: 24,
});

console.log(c(), d()); // 42 24
```

## License
Expand Down

0 comments on commit 752893f

Please sign in to comment.