effector-react v0.18.1 Release Notes

    • โž• Add forward: common function for forwarding updates and events
    import {forward} from 'effector'
    
    const unsubscribe = forward({
      from: Event | Store,
      to: Event | Store | Effect,
    })
    
    • โž• add support for storages in store.on
    import {createStore} from 'effector'
    
    const $name = createStore('name')
    const $counter = createStore(0).on(name, (count, name) => count++)
    
    • ๐Ÿ‘ Allow to pass {handler: Function} as second argument to createEffect
    import {createEffect} from 'effector'
    
    const callApiFx = createEffect('call api', {
      async handler(url) {
        const res = await fetch(url)
        return res
      },
    })
    
    • ๐Ÿ‘‰ Make effect.use return the same effect instead of void (ability to chain method calls)
    import {createEffect} from 'effector'
    
    const callApiFx = createEffect('call api').use(url => fetch(url))