solid-primitives icon indicating copy to clipboard operation
solid-primitives copied to clipboard

[storage] Sync Support for `tauriStorage`

Open jaydevelopsstuff opened this issue 1 year ago • 1 comments

Describe The Problem To Be Solved

Currently, it seems there is no method for syncing changes with the tauriStorage storage backend.

Suggest A Solution

The JS API for Tauri's Store plugin (which the current impl uses) has an onChange method which can be used to receive any changes to the store via a callback, even if they are made from other windows or the Rust backend.

onChange fires anytime the store is modified, even when the change was made in the same window, so that will need to be taken into account to avoid infinite loops.

jaydevelopsstuff avatar Aug 29 '24 02:08 jaydevelopsstuff