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

only refresh when there is a change #63

Open
UXDart opened this issue May 18, 2022 · 2 comments
Open

only refresh when there is a change #63

UXDart opened this issue May 18, 2022 · 2 comments

Comments

@UXDart
Copy link

UXDart commented May 18, 2022

Hello! if I have the sample todo list, and I do a "todo.completed = false;" always false
if the value is already false, it triggers a change in the store.. and the page refreshes. is it possible to trigger a change only if the set value is different from the current one? of course, I can check if completed is false, but would like a way to do this automatically if possible. Thanks!

@YousefED
Copy link
Owner

Hi! This should already be happening. Do you have a codesandbox link with an example?

@UXDart
Copy link
Author

UXDart commented May 23, 2022

yes, check this one https://codesandbox.io/s/sandpack-project-forked-do2rj7?file=/App.tsx
completed is always set to false / click many times on the unchecked checkbox, and in the console you will see the refreshss line in the console. TIA

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

2 participants