general-store
general-store copied to clipboard
use lazy state initialization to avoid eager deref calculation
h/t @gmcnaughton for pointing out that we can optimize this hook with a lazy state init to avoid double-calculating the deref on every render, which can be meaningful for expensive derefs
TODOs
- [x] linter, checker, and test are passing
- [ ] any new public modules are exported from
src/GeneralStore.js
- [ ] version numbers are up to date in
package.json
- [ ]
CHANGELOG.md
is up to date