Skip to content

Issues with version 4 #3902

Answered by aliemir
van-vince asked this question in Q&A
Mar 17, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey @van-vince sorry for the issue!

Are you using a custom <Sider>component? Looks like an issue related to the router changes.

If you're using the new routerProvider prop; you'll also need to update the usage of useRouterContext hook, which is deprecated and only works with the legacy router providers.

You can replace the Link usage from useRouterContext with the useLink hook;

- import { useRouterContext } from "@refinedev/core";
+ import { useLink } from "@refinedev/core";

const CustomSider = () => {
-   const { Link } = useRouterContext();
+   const Link = useLink();

    /* ... */
}

Let me know if this resolved the issue, if not can you give us a bit more info about the issue? Let's …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@van-vince
Comment options

Answer selected by omeraplak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants