Skip to content

effector 21.4.0

Choose a tag to compare

@zerobias zerobias released this 05 Oct 11:54
· 3175 commits to master since this release
c17dd54
  • Add support for return status to allSettled. When allSettled is called with Effect, it return object with value and status fields (discussion)
import {createDomain, fork, allSettled} from 'effector'
const app = createDomain()
const fx = app.createEffect(() => 'ok')
const result = await allSettled(fx, {scope: fork(app)})
// => {status: 'done', value: 'ok'}

Try it

  • Allow to expicitly define return/error types in createEffect(handler)
const fx = createEffect<number, string, Error>(x => x.toString())
// fx has type Effect<number, string, Error>
  • Add types for domain.effect(handler)

  • Fix effector/babel-plugin behavior in case when methods like createStore are imported from unrelated library and should be ignored. Import library could be defined by importName config field

  • Improve fork api support for watchers