YousefED / SyncedStore

SyncedStore CRDT is an easy-to-use library for building live, collaborative applications that sync automatically.
https://syncedstore.org
MIT License
1.71k stars 51 forks source link

only refresh when there is a change #63

Open UXDart opened 2 years ago

UXDart commented 2 years ago

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 commented 2 years ago

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

UXDart commented 2 years ago

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