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

Suggestion for improvement effector/prefer-useUnit rule #145

Open
dmitryshelomanov opened this issue Jul 2, 2023 · 0 comments
Open

Suggestion for improvement effector/prefer-useUnit rule #145

dmitryshelomanov opened this issue Jul 2, 2023 · 0 comments
Labels
enhancement New feature or request need to discuss Issue should be discussed RFC

Comments

@dmitryshelomanov
Copy link

Error message

leaveEvent must be wrapped with useUnit from effector-react before usage inside React components

Example

function useLeave(event: Event<void>) {
  const e = useUnit(event)
}

No need to apply effector/prefer-useUnit to custom hooks params.
Verification is required only at the place of use.
For example above - error message valid if event no wrap in to useUnit

@igorkamyshev igorkamyshev added enhancement New feature or request need to discuss Issue should be discussed RFC labels Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request need to discuss Issue should be discussed RFC
Projects
None yet
Development

No branches or pull requests

2 participants