effector

Business logic with ease ☄️

MIT License

Downloads
370.3K
Stars
4.5K
Committers
151
effector - effector-react 23.2.0 Latest Release

Published by zerobias 9 months ago

  • Make Gate.open and Gate.close EventCallable to allow users to call it in tests
effector - effector 23.2.0

Published by zerobias 9 months ago

  • Improve type validation for derived stores in fork
  • Add missed runtime validation for allSettled calls with derived units. This case was labeled as a type error, but was forgotten in runtime.
effector - effector 23.1.0

Published by AlexandrHoroshih 10 months ago

effector - effector-react 23.1.0

Published by AlexandrHoroshih 10 months ago

effector - effector-react 23.0.1

Published by zerobias 11 months ago

  • Fix warning about useStore appeared in useList (PR #1022)
effector - effector Spacewatch 23.0.0

Published by zerobias 11 months ago

Improvements

  • Introduce EventCallable, StoreWritable and UnitTargetable types to allow users to express and understand what could be updated or called directly and what could not. Now createStore returns StoreWritable which can be passed to sample target and combine returns Store which will show type and runtime error (PR #966)
  • Improve error messages: now it includes unit names and locations so it will be useful to find errors in raw server logs or bundles with disabled source maps. To enable locations in errors use addLoc: true in babel-plugin. Usually the one wanted to enable this in development only so addLoc plugin option is disabled by default (PR #1015)
  • Add batch option to createWatch (PR #850)
  • Add @withease/factories to babel-plugin defaults (PR #995)
  • Add all patronum modules to babel-plugin defaults (PR #996)
  • Rename greedy to batch in sample. greedy: true becomes batch: false which is a better mental model for what this option do (PR #972)
  • Unify programmatic sid insertion in merge and restore (PR #969)
  • Allow domain to be used in attach without parent effect (PR #895)

Bug fixes

  • Fix nullable type of .reinit, now it exists in StoreWritable and not exists in Store (PR #966)
  • Fix serialization of ignored stores (PR #903)
  • Fix race condition in parallel effect calls (PR #849)
  • Fix scope reading its initial values from current (not initial) store value (PR #909)
  • Fix duplicated combine calls (PR #916)
  • Fix reading stale value in attach (PR #1011)

Deprecations and removed apis

  • Deprecate undefined as magical value to skip store updates, use skipVoid: true option in combine and map to enable old behavior. Getting rid of that edge case will allow to introduce lazy computations (issue #920)
  • Deprecate forward and guard in favor of sample (PR #913)
  • Deprecate reactSsr option in babel-plugin (PR #910)
  • Deprecate onlyChanges option in serialize (PR #907)
  • Deprecate raw object {[fx.sid]: Function} in fork handlers (PR #973)
  • Deprecate .watch with second argument in favor of sample (PR #906)
  • Deprecate .getType() - relic from ancient times which exists for redux compatibility (PR #899)
  • Deprecate effector/babel-plugin-react (PR #948)
  • Deprecate fork(domain) and hydrate(domain) - this api existed for traking units in scopes when Fork API was introduced, but starting from 22 version this is done automatically and domain is no longer required for that (PR #950)

  • Throw error when unit called from a pure function (PR #905)
  • Throw error when derived event is called (PR #905)
  • Throw error when fn in $store.map(fn) returns undefined in the initialization (issue #828)

  • Remove flow typings. In the beginning, the effector was written in flow, but now only types remained and they were extremely outdated due to lack of expertise in the technology. The flow community maintains bindings in a separate repository. (PR #912)
  • Remove deprecated effector/fork module (PR #842)
  • Remove deprecated createStoreObject alias for combine (PR #908)
  • Remove deprecated .thru method (PR #843)
  • Remove deprecated second argument with state from $store.map (PR #846)
  • Remove deprecated restore($store) support. This was an obscure feature when store is passed to method and returned without changes as is (PR #1018)

Performance

  • 10% performance improvement (PR #1014)

See also our migration guide

effector - effector-react 23.0.0

Published by zerobias 11 months ago

  • Deprecate effector-react/scope in favor of isomorphic hooks (PR #979)
  • Deprecate useStore, useEvent, connect and createStoreConsumer in favor of universal useUnit (PR #951)
  • Deprecate createComponent in favor of @effector/reflect
  • Remove deprecated effector-react/ssr module (PR #844)
  • Remove deprecated createReactState and createContextComponent (PR #845)
effector - effector-vue 23.0.0

Published by zerobias 11 months ago

  • Add useUnit hook (PR #1003)
  • Make bindings isomorphic
  • Deprecate effector-vue/ssr in favor of isomorphic hooks (PR #1005)
  • Remove obsolete deprecated apis $watchAsStore and $store (PR #1004)
effector - effector-solid 0.23.0

Published by zerobias 11 months ago

  • Make all hooks isomorphic
  • Deprecate effector-solid/scope in favor of isomorphic hooks (PR #979)
effector - effector 22.8.8

Published by zerobias 11 months ago

  • Add new types from effector 23: UnitTargetable, EventCallable and StoreWritable as aliases to improve migration experience and ecosystem compatibility (PR #1017)
effector - effector 22.8.7

Published by zerobias about 1 year ago

  • Fix combine function called twice on first allSettled call (PR #984)
effector - effector-react 22.5.4

Published by AlexandrHoroshih about 1 year ago

effector-react 22.5.4

Fix for createWatch implementation to improve @effector/next updates flow

effector - effector-react 22.5.3

Published by zerobias over 1 year ago

  • Fix too frequent useUnit updates (PR #904)
effector - effector 22.8.6

Published by igorkamyshev over 1 year ago

  • Follow-up fix for 22.8.2: now combine in tuple-form handles complex edge-cases with mapped stores correctly. (PR #902)
effector - effector-react 22.5.2

Published by zerobias over 1 year ago

effector - effector 22.8.5

Published by AlexandrHoroshih over 1 year ago

effector - effector 22.8.4

Published by AlexandrHoroshih over 1 year ago

Fixed an edge case for fork calls without sid (function from release 22.8.0). Some libraries provide built-in sid's in the code, which led to the duplicated sid found exception when calling fork when trying to use two instances of the same factory in a test and running it without effector/babel-plugin.

The exception on fork calls is no longer thrown, and all sid-related checks and assertions have been moved to serialize calls, since sid's are actually only required for serialize to work. PR #897

effector - effector 22.8.3

Published by AlexandrHoroshih over 1 year ago

  • Added missing node and stateRef ids to meta-objects. These are internal changes which are not covered by the types or docs yet.
effector - effector 22.8.2

Published by AlexandrHoroshih over 1 year ago

  • combine types now allow primitive values, just like it was stated in the docs. Thanks to @faustienf 🎉 PR #884
  • Events, created from split with match-object shape and internal inFlight counters of Effects now have proper metadata to use in the Inspect API. PR #892
effector - effector 22.8.1

Published by AlexandrHoroshih over 1 year ago

  • Internal state refs now also see meta, if owned by store. PR #889
Package Rankings
Top 1.08% on Npmjs.org
Top 14.96% on Deno.land
Badges
Extracted from project README
Tested with browserstack