effector icon indicating copy to clipboard operation
effector copied to clipboard

Deprecate `Domain` unit creator methods

Open kireevmp opened this issue 1 year ago • 1 comments

As discussed in #590, methods on Domain are hard to work with within plugins (both Babel and SWC).

Proposal

Deprecate the following legacy Unit creators on Domain:

  • .event and .createEvent
  • .effect and .createEffect
  • .store and .createStore
  • .domain and .createDomain

There has been an alternative way to attach the domain to a unit via argument since Encke 22.4.0 (released Nov 5, 2022), so there's been enough time to adopt it.

Additionally, Domain methods provide worse DX by default and are inconsistent with the rest of Effector API.

kireevmp avatar Feb 27 '24 09:02 kireevmp

Yes, it’s a good idea, we’ll go in that direction, maybe we could deprecate them altogether.

Next major version should be relatively small, without large depreciations, so it’s planned for the effector 25

zerobias avatar May 07 '24 15:05 zerobias