Replies: 1 comment
-
Here's a more recent comment from the devs in another issue: #7200 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is the new or updated feature that you are suggesting?
First of all, I know that this question what raised before
#4407
However, I cannot find any finalized and agreed solution.
First of all, let me explain why I think it will be great to have it.
Well, mainly because of such solutions as Relay. I know that relay is probably not very popular nowadays, but still... The main idea they keep on insisting is that you load your queries BEFORE rendering a component. And with the current react-router, I do not seem to find any solution to this. Thus having to either make workarounds (which in fact would not do the trick) or stick to the less optimized and less recommended solution:
useLazyLoadQuery
.I just wanted to insist that I really like react-router, and I do not want to invent my own router just for this case. Let's think about what would be better:
Your team of professionals just adds an ability to prefetch data before rendering a component. It will lead to even higher demand and more downloads for react-router.
or
People would try to reinvent the wheel just because react-router does not have this feature. People will spend much time and still, it won't be as mature as your library.
Obviously, the first option seems to be the best for both developers and react-router library. (I realize that it may not be as easy as I described it, but anyway, it is better to have this as part of the battle-tested library)
I know that there is a solution for integrating relay with routing. But that solution is not very popular and does not have many downloads (meaning the chances are, it will be abandoned or will not have enough community support)
Why should this feature be included?
E.g. there is a resolver feature in angular https://angular.io/api/router/Resolve#description
And something similar in vue https://router.vuejs.org/guide/advanced/data-fetching.html#fetching-before-navigation
Again, I am really. sorry about posting the examples and link to other libs, but I do. this for a simple reason: to show that this feature is present in all other well-known solutions and it would be extremely nice to have it in react-router.
I hope greatly that this request won't be rejected and that this time some solution will be found.
Once more, thank you for your job and this great library. And please understand, that developers are humans and we need some features too :D
Beta Was this translation helpful? Give feedback.
All reactions