Skip to content

RTKQ Architecture ideas: research TanStack Query, other libs, coordination approaches #5149

@markerikson

Description

@markerikson

Jotting down some notes in the back of my head:

  • We should probably review TanStack Query to see if there's any additional useful ideas we can glean in terms of architecture, feature set, implementation approaches, etc.
    • Probably a bunch of other libraries too (SWR, RESTHooks even though it has no real downloads, etc?)
  • The original design was entirely around individual hooks, but we've seen lots of users want to do queries in more coordinated ways: sequential, combined, etc. In other words, the next layer up from "run this one query". Currently this devolves into "just call the hooks and let your component coordinate things", but that's not always ergonomic. I know this is vague, but worth thinking through a bit.
  • Similarly, we've grown a half-dozen different aspects of internal query coordination: hooks, thunks, polling, invalidation, lifecycles, delayed invalidations, etc. It's all been very ad-hoc and it feels like we're stretching the bounds of what we can do here. Worth thinking through the pieces and figuring out if there's any consolidation or better design.
  • Obligatory "bundle sizes are too big and all the thunks and logic are complicated, can we redesign the internals to be nicer somehow?"
  • would still like to do something around normalization, but maybe a TSDB adapter sufficiently addresses that?

and then I'm sure there's plenty of related ideas in #3692 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions