-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement LS cleanup #116
Comments
Seems like a bug. Can you post the full name of the key, what browser and how exactly do you use Logux (what log storage, how create Logux client). |
FF 130. import { CrossTabClient, IndexedStore } from "@logux/client";
import { LocalPair } from "@logux/core";
import { nanoid } from "nanoid";
const pair = new LocalPair();
export const loguxClient = new CrossTabClient({
store: new IndexedStore(),
server: pair.left,
subprotocol: "1.0.0",
userId: nanoid(),
});
// Some loguxClient.type("...", ...) calls
loguxClient.start(); |
Got it. The problem is because you create unique user ID every time. userId: nanoid(), In this case you need to call We can't add built-in feature because most of the users need opposite, the persistence local-first data with real user ID from database. |
I tried to use "stable" |
In
@logux/[email protected]
localStorage may be clogged with old client identities.view of dev tools with localStorage
Is there a way to clean up this?
The text was updated successfully, but these errors were encountered: