Skip to content

Unexpected behavior using the same createLocalPersister from multiple tabs #257

@jldec

Description

@jldec

I was following the pattern to use createLocalPersister from this client example and noticed some extra rows appearing when there are multiple tabs open (sharing local storage).

I have pushed a repro to github, relevant code in App.tsx.

You can also visit https://jldec-tinybase-localpersister-repro.jldec.workers.dev/ to see the problem.

steps

  • visit the url above or git clone, pnpm install, pnpm dev to start a dev server
  • open 2 tabs on the same endpoint
  • add few messages and then reset
  • notice that the 2nd tab shows extra blank messages (as many as were there before you cleared)
Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions