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

Mark read only stores and events as readonly #275

Closed
igorkamyshev opened this issue Feb 23, 2023 · 1 comment
Closed

Mark read only stores and events as readonly #275

igorkamyshev opened this issue Feb 23, 2023 · 1 comment
Milestone

Comments

@igorkamyshev
Copy link
Owner

Some units in Query and Mutation should not be called (or mutated) outside. Let's mark it with read-only helper to enforce it.

function readonly(unit) {
  return unit.map(identity)
}

An attempt to call or mutate it will cause a warning in Effector 22 and an exception in Effector 23.

@igorkamyshev
Copy link
Owner Author

Done, will be released in #312

@igorkamyshev igorkamyshev added this to the v.0.9 milestone Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant