Skip to content

Implement useQuery hook #26

@269652

Description

@269652

We need a way to directly query the database in order to obtain a list of states for a given scope and key. At the moment you need to use arrays to keep track of "lists". While this makes sense for finite lists, it doesn't make sense for lists with an indefinite / growing length, such as posts in a forum.

If we implement a reactive useQuery hook, we can directly pass client side paging props to the database and return a reactive / live query to the server which contains all states for the requested scope.

This also mitigates the need to reflect changes to a single post in the list itself such as approving a post as the useQuery already obtains all the needed information and rerenders the component if a state has been added to the lists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestexpertThis feature needs expert level knowledge of TypeScript and React Server

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions