question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] `refine-react-router-v6` does not apply `options.route` correctly

See original GitHub issue

Describe the bug

Given a configuration with two resources:

                resources={[
                    {
                        name: 'users',
                        list: UserList
                    },
                    {
                        name: 'users',
                        list: LegacyUserList,
                        options: {
                            dataProviderName: 'users-legacy'
                            route: 'users-legacy',
                            label: 'Users (Legacy)'
                        },
                    }]

While both routes are available in the sense that they do not return 404 errors, the routing differs between versions.

With refine-react-router:

  • /users renders UserList
  • /users-legacy renders LegacyUserList

With refine-react-router-v6:

  • /users renders UserList
  • /users-legacy renders UserList

Also, refine-react-router-v6 doesn’t use the correct data provider, the rendering is exactly the same for /users and /users-legacy.

Expected behavior v6 should render the same as v5.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rassiecommented, Mar 15, 2022

Found it, the order of resources is important. See https://codesandbox.io/s/refine-base-example-forked-l5uxt7.

0reactions
omeraplakcommented, Mar 16, 2022

Hey @rassie , Thank you! We’ve released @pankod/refine-react-router-v6@3.7.1. Could you approve this fix?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
[Bug]: Relative navigation issue while navigating from "index" route: ". ... The workaround is to use resolvePath that has no relation to <Route>...
Read more >
CSCts39535 - bgp outbound route-map, [un ... - Cisco Bug
Thus, the route map may not be applied correctly, resulting in erroneous filtering or advertising of unintended routes.
Read more >
76511 – /sbin/ip does not set routing table properly for "equal ...
Description of Problem: We try to test (and if successful use) "equal cost multipath" routing using RH80 and iproute. But the /sbin/ip binary...
Read more >
Bug #1564460 “Router set --route option does not work”
The router set --route option does not work. $ openstack router set --route destination=10.10.10.0/24,gateway=10.10.10.1 foo
Read more >
How can I redirect in React Router v6? - Stack Overflow
I think you should use the no match route approach. ... these components to avoid unnecessary redirects on clicking back and forward option....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found