effector 0.18.10
zerobias
released this
22 May 08:39
·
5415 commits
to master
since this release
- Implement event
store.updates
, representing updates of given store. Use case: watchers, which will not trigger immediately after creation (unlikestore.watch
)
import {createStore, is} from 'effector'
const clicksAmount = createStore(0)
is.event(clicksAmount.updates) // => true
clicksAmount.watch(amount => {
console.log('will be triggered with current state, immediately, sync', amount)
})
clicksAmount.updates.watch(amount => {
console.log('will not be triggered unless store value is changed', amount)
})