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

📎 (SolidJS) createEffect and createMemo should only return once #2603

Open
marvin-j97 opened this issue Apr 25, 2024 · 0 comments
Open

📎 (SolidJS) createEffect and createMemo should only return once #2603

marvin-j97 opened this issue Apr 25, 2024 · 0 comments

Comments

@marvin-j97
Copy link
Contributor

marvin-j97 commented Apr 25, 2024

Description

I don't think this is part of #2438 but would be another useful rule. Basically, when having diverging control flow in an effect or memo, a dependency may not be tracked, which could (partially) break reactivity. If an effect handler has some conditionals, it should either hoist the signal accesses to the top, or use on (https://docs.solidjs.com/reference/reactive-utilities/on-util#on).

More info: https://docs.solidjs.com/advanced-concepts/fine-grained-reactivity#managing-lifecycles-in-a-reactive-system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant