@refinedev/nextjs-router@6.0.0
版本发布时间: 2024-02-06 22:25:57
refinedev/refine最新发布版本:@refinedev/supabase@5.9.4(2024-09-03 19:48:37)
Major Changes
-
#5573
546df06482
Thanks @alicanerdurmaz! - With this version, the@refinedev/nextjs-router
package now starts supporting Next.js@14 and App Router by default. You can upgrade your application by following the upgrade guide.We recommend that projects using Ant Design refrain from upgrading at the moment due to the incompatibility between Ant Design and Next.js 14 Pages Router. For more detailed information, you can refer to the Known Issues document in Ant Design here.
Upgrade Guide
npm i next@14 @refinedev/nextjs-router@latest
See Next.js 14 Upgrade Guide and Next.js 14 Codemods for more information.
Changes to default export
Default export for
@refinedev/nextjs-router
is nowApp Router
instead ofPages
.If you are using
Pages
, update your imports as follows:- import routerProvider from "@refinedev/nextjs-router"; + import routerProvider from "@refinedev/nextjs-router/pages";
If you are using
App Router
, update your imports as follows:- import routerProvider from "@refinedev/nextjs-router/app"; + import routerProvider from "@refinedev/nextjs-router";
Changes to
parseTableParams
importIf you will use
parseTableParams
on client side for App Router, you can use the following import:import { parseTableParams } from "@refinedev/nextjs-router";
parseTableParams
from@refinedev/nextjs-router
has"use client"
directive.If you want to use
parseTableParams
on server side for App Router, you can use the following import:import parseTableParams from "@refinedev/nextjs-router/parse-table-params";
parseTableParams
from@refinedev/nextjs-router/parse-table-params
doesn't have"use client"
directive.Dropped Refine v3 router provider legacy support
Now,
@refinedev/nextjs-router
only supports Refine v4 router provider.The following exports are removed:
- @refinedev/nextjs-router/legacy - @refinedev/nextjs-router/legacy-app - @refinedev/nextjs-router/legacy-pages
Patch Changes
-
#5573
546df06482
Thanks @alicanerdurmaz! - chore: add "use client" directive to exported files to work with nextjs app router