Skip to content

Sometimes duplicate keys appear in useList after database insertion #245

Open
@NathanC

Description

@NathanC

I've noticed this issue intermittently:

When a new record is added to the realtime database, it shows up multiple times in the list when using useList. When I refresh the page, it will go back to only being shown once. This has happened for multiple different views of useList (a data table, a custom component, etc), and I'm confident it's caused by a single key appearing multiple times in the data snapshot.

This has happened in two different apps of mine, a normal react project and a react native project.

I haven't been able to consistently reproduce this, but it's happened frequently enough that I bet it happens to other users. Has anyone noticed this happening to them?

(This is a very useful library by the way, thank you for creating it!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions