Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Is that pure? #2768

Closed
uniho opened this issue Oct 12, 2024 · 0 comments
Closed

Is that pure? #2768

uniho opened this issue Oct 12, 2024 · 0 comments

Comments

@uniho
Copy link

uniho commented Oct 12, 2024

let value = valueFromReducer
if (storeFromReducer !== store || atomFromReducer !== atom) {
rerender()
value = store.get(atom)
}

Is that code pure?
A React doc says "each component should only “think for itself”, and not attempt to coordinate with or depend upon others during rendering.".
That code may be on "during rendering".

@pmndrs pmndrs locked and limited conversation to collaborators Oct 12, 2024
@dai-shi dai-shi converted this issue into discussion #2769 Oct 12, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant