Skip to content

useLiveQuery doesn't update if the query parameters change. #2651

Description

@rphlmr

useLiveQuery keeps listening to the initial query it gets on the first render.

  const todos = useLiveQuery(
    db.query.todos.findMany({
      where: between(schema.todos.created_at, from, to),
    })
  )

The from & to dates come from a parent / state.

Maybe it is because

should have query in its depency array.

Originally posted by @anstapol in #2447 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions