Omnistac / zedux

:zap: A Molecular State Engine for React
https://Omnistac.github.io/zedux/
MIT License
376 stars 7 forks source link

feat(atoms): deprecate `injectInvalidate` (prefer `injectSelf`) #70

Closed bowheart closed 1 year ago

bowheart commented 1 year ago

Description

Since we introduced injectSelf, injectInvalidate isn't necessary. Deprecate it. We'll plan to remove it in Zedux v2.

Use the following pattern instead:

const self = injectSelf()
// then in a callback or effect:
self.invalidate()