effector-storage
effector-storage copied to clipboard
Add `@@trigger` protocol support for `pickup` option
https://withease.pages.dev/protocols/trigger.html
import { trackNetworkStatus } from '@withease/web-api';
persist({
store: $store,
pickup: trackNetworkStatus
})
@@trigger
protocol requires calling setup
event, but for persist
pickup
is actually an analogue of setup
. So, there is a loop, to add trigger to pickup we need to call pickup, which is trigger...
Maybe introduce new options setup
and teardown
?