useReactQueryAutoSync
A helpful react hook for building interfaces which require autosave.
To run the drawing demo simply clone the repository and run yarn followed by yarn dev. If you open two browser windows to localhost:3000 you can click to draw and the drawings will sync between pages.
Example
TODO
create a demo with perfect-freehand- compare with alternatives such as websockets, long polling, replicache
- When is this a good idea, when are alternatives better?
- See if it is possible to have
setDraft
use the server value if the local value is not defined- otherwise you cannot memoize a
setDraft
function
- otherwise you cannot memoize a