Open sbdchd opened 1 year ago
Ah interesting. Thanks for reporting! I'm wondering what might be the best solution here. A simple timed throttle on the atom won't work because 3.33 updates per second doesn't make sense for a text input. Top of my mind: option 1, we can create a real time state for the text input and put a throttle between the state and the atom (a solution external to recoil-sync and can be applied when needed); option 2, we can use a real time atom and put a throttle on the syncing effect (an API of recoil-sync). One problem here is that when the update happens on the other side (e.g. manual URL update) some data might be missing. But I guess that's usually fine for URL sync?
With Safari, if you call history.replace or history.pushState too frequently, the history APIs will throw a SecurityError.
example code to reproduce: