Changelog

effector

20.13.5

  • Extend typescript support for any to void forwarding: add support for forwarding to array of void units
  • Fix computed stores support for hydrate
  • Fix allSettled support for effects as first argument

20.13.0

  • Introduce attach: wrapper for effect, which allow to map effect arguments and use data from stores.

Use cases: declarative passing values from stores to effects and argument preprocessing.

Documentation for attach

  • Add noDefaults option for effector/babel-plugin for making custom unit fabrics with clean configuration

20.12.2

  • Add type support for sample with target and without clock (in that case, source will become clock as well)

Try it

20.12.1

  • Add support for guard to babel-plugin
  • Add support for forward to babel-plugin
  • Add support for explicit domain.hooks calls as escape hatch for imperative adding units to given domain

20.11.0

  • Add effect.inFlight store to effects. It show how many effect calls aren’t settled yet. Useful for rate limiting.

Try it

Documentation for effect.inFlight

  • Introduce withRegion: region-based memory management tool, which attach units (stores, events and effects) and watchers, created inside given callback to lifecycle of owner unit to be erased together with it.

Try it

  • Add support for Map<Store, any> to values property in fork.
  • Fix concurrent requests support in effect.pending: it will become false only after all pending effect calls becomes settled.

20.10.0

  • Add launch({target: unit, params}) overload for launch - low level method for running computation in units (events, effects or stores). Mostly used by library developers for fine-grained control of computations.

20.9.0

  • Introduce effector/fork and effector-react/ssr: api for server side rendering and managing independent instances of application in general.

This solution requires effector/babel-plugin in babel configuration:

Example application with express Serverless example

  • Add events created with createApi, stores created with restore and events created with .prepend to domain of given source units

Try it

20.8.2

  • Improve combine batching in a few edge cases with nested combine calls

Try it

20.8.0

  • Allow to use objects and arrays with stores in sample source

Try it

20.7.0

  • Add domain.createStore as alias for domain.store (proposal)
  • Add domain.createEvent as alias for domain.event
  • Add domain.createEffect as alias for domain.effect
  • Add domain.createDomain as alias for domain.domain

20.6.0

  • Add support for arrays to forward

Try it

20.5.0

  • Merge createStoreObject to combine to reduce api surface. Wherever createStoreObject was used, it can be replaced with combine

Try it

  • Add ability to use arrays of stores with combine

Try it

20.4.4

  • Ensure that both effect.done and effect.fail are called before effect.finally watchers, thereby preventing side-effects from interrupting pure computations

20.4.3

  • Throw expected error in case with sample({clock: undefined})

20.4.0

  • Introduce guard: conditional event routing Control one event with the help of another: when the condition and the data are in different places, then we can use guard with stores as a filters to trigger events when condition state is true, thereby modulate signals without mixing them

See ui visualization

Also, guard can accept common function predicate as a filter, to drop events before forwarding them to target

Type inference Implementation tests

  • Introduce name property in sample parameters list

Each basic entity in Effector (event/effect/store/domain) may have a name. You now can name sampled entities in the same manner as basic ones.

20.3.2

  • Allow typescript to refine type with split method (PR)
  • Improve type inference of effects with optional arguments in Typescript (PR)
  • Ensure that effect handler is called only after effect update itself, thereby preventing side-effects from interrupting pure computations

Try it

20.3.1

  • Fix edge case when clearNode been called on store belonged to certain domain led to the removal of the entire domain

20.3.0

  • Add shortName to domains

Try it

  • Add history to domains with read-only sets of events, effects, stores and subdomains

Try it

20.2.0

  • Add support for domains to clearNode
  • Add .sid - stable hash identifier for events, effects, stores and domains, preserved between environments, to handle client-server interaction within the same codebase.

The key is that sid can be autogenerated by effector/babel-plugin with default config and it will be stable between builds

See example project

  • Add support for implicit void params in createEffect for typescript #106
  • Fix bug with cannot read property .toString of undefined error during store initialization

20.1.2

  • Allow typescript to refine type of payload if event.filter({fn}) got a predicate function as a callback PR
  • Allow typescript to refine type with is methods PR
  • Add new fields to definition of graph nodes (discussion)

20.1.1

  • Add support for IE11 to effector/compat
  • Fix flow typings for sample
  • Allow effector/babel-plugin to work in browser

20.1.0

  • Add effector/compat module to use with Smart TV (Chrome 47) apps without babel (fix #152). Starting with this release, the library code is tested by browserstack.com for compatibility with our targets, including smart tv
  • Improve typescript typings for sample (thanks @abliarsar) (PR #156)
  • Fix webpack issue, which generated incorrect code with some ancient targets (IE10)

20.0.0

  • Add merge for merging events

Try it

  • Add split for pattern-matching over events

Try it

  • Allow clearNode to automatically dispose all related intermediate steps

Try it

  • Fix promise warning for effects

  • Add effect.finally

Try it

  • Add types for createEvent with config instead of string
  • Add types for createEffect with config instead of string
  • Add event.filterMap as new alias for event.filter(fn)
  • Remove extract, withProps, is.* re-exports

19.1.0

  • Add support for event.filter with common predicate functions

19.0.0

To indicate the stability of the project, we adopting semantic versioning and happy to announce version 19.0.0 for all packages. And to make the transition easier, that release contains no breaking changes; simple replacement of “^0.18.*“ to “^19.0.0” is safe for sure ☄️

0.18.7-0.18.8

  • Add support for passing multiply items at once in store.reset
  • Add support for createEvent and createEffect with config (see next code example)

  • Add .pending property for effects

it’s a shorthand for common use case

Try it

  • Introduce sample. Sample allows to integrate rapidly changed values with common ui states

see sample in action here

Sampling (signal processing)

  • Add babel plugin for automatic naming of events, effects and stores (useful for identifying resources with SSR)
  • Add babel plugin for automatic displayName for react components

Plugins are available out from a box

.babelrc:

see plugins in action

  • Add support for passing events and effects to watchers
  • Improve execution order for sync effects
  • Improve typescript typings for createApi (#102)

0.18.5-0.18.6

  • Optimize combined stores: no intermediate steps no more
  • Use the new kernel. Provide improved eventual consistency: any side effects will be triggered only after performing all pure computations

  • Add is namespace for all type validators

  • Add clearNode to break references and subscriptions between events, stores, etc

  • Add support for custom datatypes by making step constructors, createNode and launch functions public

  • Fix fromObservable, ensure it works with redux as a typical library with Symbol.observable support
  • Fix version, now it always equals version in package.json
  • Add support forwarding to effects

0.18.3-0.18.4

  • Add version variable to public exports
  • Add effect handler to domain 4c6ae8

  • Add Unit<T> as common interface implemented by Event, Effect and Store

  • Add isStore, isEvent, isEffect and isUnit validators

  • Add extended createStore with config
  • Publish babel-plugins

  • Improve naming for chrome performance timeline

  • Fix typescript typings #45

  • Fix event.prepend bug #35

0.18.2

  • Fix webpack usage issue. To prevent this in a future, webpack integration test was added.

  • Improve typescript typings for createApi. This code example became type checked

  • Add umd bundle to npm. Therefore, you can use cdn to include library without bundlers

0.18.1

  • Add forward: common function for forwarding updates and events
  • add support for storages in store.on
  • Allow to pass {handler: Function} as second argument to createEffect
  • Make effect.use return the same effect instead of void (ability to chain method calls)

0.18.0

  • Log events into Chrome devtools performance timeline
  • Add notifications about errors inside computation chain
  • Add store.defaultState property
  • effector-react: Add createComponent
  • Make withProps static function
  • Make effect return plain promise

0.17.7

  • Keep and replay the whole domain history for every new hook

0.17.6

  • Add domain hooks for handle new events, effects or stores in domain.
  • Improve TypeScript typings

0.17.5

  • Add ability to use createEvent, createEffect and createDomain without arguments (omit name)
  • Fix wrong order of effect names
  • Add createWrappedDomain to watch all nested events and updates
  • Add extract to watch only part of nested storages
  • Deprecate .epic method (library supports symbol-observable, so assumed that most.from(event) or Observable.Of(store) covered all use cases)

0.17.4

  • effector-react: Add check for mounting of store consumer
  • Add effect.use.getCurrent() method to get current used function
  • Improve type inference in flow typing for createStoreObject
  • Improve public ts and flow typings

0.17.3

  • Fix effector-react typings
  • Build with node 6 target, add engine field to package.json
  • Add warning dependency

0.17.2

  • Memoize store.map and store updates

0.17.0

  • Added sync graph reduction engine (it’s internal)
  • Added store updates memoization
  • Introduced effector-react

0.16.0

  • Removed most-subject dependency
  • New api

0.15.0-rc.2

  • Add AVar: low-level interface for asynchronous variables
  • Clean up builds before publishing
  • Add types dir into npm build

0.14.0

  • Add independent createStore method
  • Replace console.warn with console.error in warnings
  • Make reducers full-featured store elements (add .get(), .set(x) and .map(fn) methods)
  • Add observable declaration to effects, events and reducers, which allow interop in this way: from(effect)

0.13.0

  • Build via rollup
  • New module architechture

0.12.0

  • Exclude coverage from npm build
  • Rename mill to collect
  • Rename joint to combine

0.11.1

  • Remove source files from npm release

0.11.0

  • Add support for sync functions in .use
  • breaking Rename config option effectImplementationCheck to unused

0.10.2

  • Fix overriding of flow modules

0.10.0

  • breaking Removed rootDomain alias for createRootDomain
  • Fixed duplication of typeConstant events
  • Added sync event propagation
  • Catching of watch function errors
  • Added warning to port errors
  • Added type aliases DomainAuto, EventAuto and EffectAuto
  • Added mill fluent “AND” reducer combinator

0.9.1

  • Added hot reload support for root domains
  • Added support for dispatching halt action

0.9.0

First stable version

effector-react

20.6.3

  • Add type support for stores with ReadonlyArray to useList for typescript

20.6.0

  • Introduce effector/fork and effector-react/ssr: api for server side rendering and managing independent instances of application in general.

This solution requires effector/babel-plugin in babel configuration:

Example application with express Serverless example

  • Add events created with createApi, stores created with restore and events created with .prepend to domain of given source units

Try it

20.5.2

  • Add ability to infer fn argument types without as const in useStoreMap. In effector-react 20.0.3 we introduced an improvement for useStoreMap types, which helps to infer types of fn arguments from keys. And now useStoreMap types improved even more: every item in second argument will have its own type even without as const, out from a box

Type tests

useStoreMap in docs

PR #274 (thanks @abliarsar)

20.5.0

  • Pass props to Gate.open & Gate.close events

Try it

20.4.0

  • Add support for keys field in useList. By default, useList rerenders only when some of its items was changed. Howewer, sometimes we need to update items when some external value (e.g. props field or state of another store) is changed. In such cases we need to tell react about our dependencies and pass keys explicitly.

Try it

20.3.0

  • Add support for react hooks in createComponent

20.2.2

  • effector-react, effector-vue and effector itself have compat builds for compatibility with old devices without babel. In such versions, it should import effector/compat, not just effector (Fix #173)

20.2.1

  • Add support for IE11 to effector-react/compat and effector-vue/compat

20.2.0

  • Add effector-react/compat module to use with Smart TV (Chrome 47) apps without babel

20.1.1

  • Add useList for efficient rendering of store lists

Try it

20.0.5

  • Fix irrelevant react memory leak warning in a few cases

20.0.4

  • Fix a bug in useStore with lack of store updates triggered by react hooks in children components

20.0.3

  • Allow as const typescript assertion for useStoreMap keys. It helps us to infer type for fn arguments

In typescript versions below 3.4, you can still use an explicit type assertion

as const in typescript docs

20.0.2

  • Fix bug with additional rerender in case of useStore argument change

20.0.1

  • Fix flow typings for useStoreMap

20.0.0

  • Removed unstable_createStoreProvider

19.0.0

To indicate the stability of the project, we adopting semantic versioning and happy to announce version 19.0.0 for all packages. And to make the transition easier, that release contains no breaking changes; simple replacement of “^0.18.*“ to “^19.0.0” is safe for sure ☄️

0.18.10

  • Add initial props factory to createComponent
  • Implicitly convert objects to createStoreObject in createComponent
  • Add mounted and unmounted events to components created by createComponent
  • Replace useLayoutEffect with useIsomorphicLayoutEffect to support server-side rendering

0.18.9

  • Replace useEffect with useLayoutEffect in useStore hook to response to state changes immediately

effector-vue

20.3.0

  • Add createComponent HOC for TypeScript usage. This HOC provides type-safe properties in vue components.

20.2.0

  • Add support for object shape

20.1.2

  • effector-react, effector-vue and effector itself have compat builds for compatibility with old devices without babel. In such versions, it should import effector/compat, not just effector (Fix #173)

20.1.1

  • Add support for IE11 to effector-react/compat and effector-vue/compat

20.1.0

  • Add effector-vue/compat module to use with Smart TV (Chrome 47) apps without babel

20.0.0

Vue adapter for effector 20

19.0.0

To indicate the stability of the project, we adopting semantic versioning and happy to announce version 19.0.0 for all packages. And to make the transition easier, that release contains no breaking changes; simple replacement of “^0.18.*“ to “^19.0.0” is safe for sure ☄️