faint-whiteF
Refine2y ago
10 replies
faint-white

Documentation related question

In this page https://refine.dev/docs/routing/integrations/remix/#usage,
app/routes/posts._index.tsx here in the code ,
import { useTable } from "@refinedev/core";
// see no imports mentioned
import { NavLink } from "@remix-run/react";

from where is the useGetToPath is being imported from ? In my code when I paste it it wants me to import useGettoPath.
import { useGetToPath, useTable } from "@refinedev/core";
// see the import above 

but when I do, in this section this error happens Type 'string | undefined' is not assignable to type 'To'.ts(2322)
              <NavLink
                to={getToPath({
                  resource: "categories",
                  action: "show",
                  meta: { id: category.id },
                })}
              >
                {post.title}
              </NavLink>


again in categories._index.tsx in the docs , getToPath has been imported but no useGetToPath. in this line const getToPath = useGetToPath(); there is another getToPath that's coming from useGetToPath(). in the <NavLink/> Type 'string | undefined' is not assignable to type 'To'.ts(2322) this error happens again.
Refine provides router bindings and utilities for Remix. This package will provide easy integration between Refine and Remix for both existing projects and new projects without giving up the benefits of Remix.
Remix | Refine
Was this page helpful?