SyncedStore icon indicating copy to clipboard operation
SyncedStore copied to clipboard

only refresh when there is a change

Open UXDart opened this issue 3 years ago • 2 comments

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!

UXDart avatar May 18 '22 14:05 UXDart

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

YousefED avatar May 23 '22 05:05 YousefED

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

UXDart avatar May 23 '22 10:05 UXDart