Open mert-duzgun opened 2 years ago
I mean, of course PRs against the examples are always welcome - but is that in any way really relevant on how to use RTK Query?
Not really. Actullay, RTK Query examples are so good for learning concepts like authentication. But react router has changed a lot and some people are getting frustrated while they try to build their own apps using RTK Query via following examples. What I'm trying to say is, it could be better for beginners since they won't have to figure out routing on their own. That's not a crucial thing, it targets beginners mostly. I just want to contribute to this awesome library and thats one thing I think I can do.
Yeah, as Lenz said, PRs are definitely welcome. I am curious - got any pointers to where "people getting frustrated", as far as discussion?
For example, the PrivateRoute.tsx
component doesn't work with v6. I know the equivalent methods are written in react-router docs but this means an extra step for a person who wants to implement basic auth for instance. Maybe the term 'frustrated' is a little bit too much :)
and the new react router v6 data api aka loader too
@pauljosephatay : see discussion of RTK + the React-Router loaders in https://github.com/reduxjs/redux-toolkit/discussions/2751 .
To be frank, we don't have time or energy to update the routing examples ourselves. We'd happily accept PRs that improve things!
Thanks a ton @markerikson for the link!
Any objection from anyone if I work on a PR for this issue?
@seanmcquaid : please, go for it!
I have noticed the last update on this issue is roughly two years now. Any objection if I update the existing PR?
No objection on my end!
Hi,
I've searched through all issues (including closed ones) and couldn't find anything about this topic. I love using RTK and RTK Query and I think the examples section is great. But they're still using
react-router-dom
v5. Since I recommend this library to several people, this situation is a little bump in the road according to feedbacks I receive. I would love to update all the examples usingreact-router-dom
v6 if there's no planned action on that topic.Thanks.