Skip to content

Issues using RTK Query outside function components #3994

Open
@markerikson

Description

@markerikson

@markerikson , this might be a bit of a hijack... sorry. I have a use case that seems pretty reasonable but I just can't get started. I have been happily using RTK for few years and now want to start using RTK Query. Within function components with hooks (as long as I add a few @ts-ignores due to this), it seems to be working ok.

Unfortunately, I need to be able to also use the store outside of function components (in inferno class components via inferno-redux -> I have some super-high-performance needs and plain react is just too slow...) and I just can't get started. I can't get any of the examples here to run and there don't seem to be any instructions on the expected way to run them. The supported way to install now appears to be with vite (which I have also been using for years) but most/all of the examples still use create-react-app, and I'm getting various different errors trying to install. Because there I couldn't find instructions, I don't know whether I'm just holding it wrong.

It is probably temporary but codesandbox also seems a bit foobared. I tried to download the class-based components example but it refused to download (something about Chrome now refusing sandbox downloads?) and there are also errors when trying to create a github repo.

So I am now a couple of hours in and still can't get an official example running. Is there something else I should be doing? Thanks!

Originally posted by @AntonOfTheWoods in #3910 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions