-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use navigate instead of resolver #5823
Use navigate instead of resolver #5823
Conversation
FYI, we backport from the release branch to Does this fix the Tizen issue? I mean, have you tested this? |
Yes, yesterday before opening the pr. My patched version is the one I'm running on the tv now. |
I'm curious what is the underlying issue with using |
It seems to be an odd internal behavior of the router: on tizen, instead of looking for the resolver, it checks just for the |
Previously (before react-router) on Tizen 2.x (WebKit) we had an issue where the |
I don't think so, this is more a library specific implementation rather than issue with the js engine itself |
Here is the piece of code that is triggering it: https://github.com/remix-run/react-router/blob/0f2b167e9b862d5e6b3425438787c8e7b39197f4/packages/react-router/lib/hooks.tsx#L450 As you can see only element, component and lazy are checked. No loader |
Hi @thornbill, is this ready to be merged or do I need to do something more? |
Ping @thornbill |
You really haven't explained why this is an issue for Tizen. The code you link to appears to only print a developer warning and looking at the message
it describes the behavior we want to happen. Also if you look at the react-router examples, you can see they have an authentication example that our code is based on (a |
@thornbill |
My question is why is this only an issue for Tizen. If the problem was that react router doesn't support what we are doing for with the redirect then it wouldn't work anywhere. |
Honestly speaking I don't know. The Tizen version I'm using is very old and the peculiarity of its engine implementation could have some bugs that can be hardly reproduced elsewhere. This would not be a new thing, since even in this repo there are some patches just for this platform. |
BTW, are we seriously spending weeks discussing on a PR of 2 lines of code (repeated 2 times), that changes stuff following the library's best practice? |
Looking it a bit deeper it could be that my tizen version doesn't fully support the header or the response classes to do redirects. I'm supposing it because jellyfin already has a patch for the headers constructor for tizen. Unfortunately I'm not 100 sure about it because for my tizen version there isn't any emulator and test each time on the TV is extremely painful. |
@thornbill Another user has the same issue: jellyfin/jellyfin-tizen#279 (comment) Can we consider merging this? |
12dfd6b
to
302914f
Compare
Quality Gate passedIssues Measures |
Use navigate instead of resolver Original-merge: 2e4e405 Merged-by: thornbill <[email protected]> Backported-by: thornbill <[email protected]>
Changes
In the routes, use the
Navigate
element instead of redirect resolverIssues
Fixes jellyfin/jellyfin-tizen#279