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

domain api. Rename event, store, effect to createEvent, createStore, createEffect #186

Closed
belozer opened this issue Aug 21, 2019 · 2 comments
Labels
core effector package enhancement New feature or request RFC Request for Comments

Comments

@belozer
Copy link
Contributor

belozer commented Aug 21, 2019

event.
Base api for create event - createEvent, but in domain domain.event....
but hook named as domain.onCreateEvent....

store.
Base api for create store - createStore, but in domain domain.store....
but hook named as domain.onCreateStore....

effect.
Base api for create store - createEffect, but in domain domain.effect....
but hook named as domain.onCreateEffect....

Proposal

Rename domain.event to domain.createEvent
Rename domain.store to domain.createStore
Rename domain.effect to domain.createEffect
Mark domain.event and domain.store, domain.effect as deprecated

OR
Rename base api createEvent -> event, createStore -> store, createEffect -> effect
and mark createEvent, createStore, createEffect as deprecated

@belozer belozer added the RFC Request for Comments label Aug 21, 2019
@belozer belozer changed the title domain api. Change event, store to createEvent, createStore domain api. Rename event, store to createEvent, createStore Aug 21, 2019
@belozer belozer changed the title domain api. Rename event, store to createEvent, createStore domain api. Rename event, store, effect to createEvent, createStore, createEffect Aug 21, 2019
@zerobias
Copy link
Member

I'm agree with renaming domain.* to domain.create* 👍

Replacing createEvent with event is not convenient, as event is common name for events itself

New aliases can be added here

@zerobias zerobias added enhancement New feature or request core effector package labels Aug 21, 2019
@zerobias
Copy link
Member

Implemented in effector 20.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core effector package enhancement New feature or request RFC Request for Comments
Projects
None yet
Development

No branches or pull requests

2 participants