Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Domain unit creator methods #1051

Open
kireevmp opened this issue Feb 27, 2024 · 1 comment
Open

Deprecate Domain unit creator methods #1051

kireevmp opened this issue Feb 27, 2024 · 1 comment
Labels
breaking changes core effector package
Milestone

Comments

@kireevmp
Copy link
Contributor

kireevmp commented Feb 27, 2024

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 kireevmp changed the title Deprecate Domain methods Deprecate Domain unit creator methods Feb 27, 2024
@zerobias
Copy link
Member

zerobias commented May 7, 2024

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 zerobias added core effector package breaking changes labels May 7, 2024
@zerobias zerobias added this to the effector 24 milestone May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes core effector package
Projects
None yet
Development

No branches or pull requests

2 participants