2.0.11
What's Changed
- [Feature] Add Next.js/SSR support @mhrrmk @salihozdemir
- [Feature] Add routerProvider @mhrrmk @salihozdemir
- [BC]
<Resource/>is deprecated. Makingresourcesproperty-based instead of component-based. - [BC]
routesprop of<Refine/>is deprecated. Custom routes must be handled by the router provider you choose.
Migration 1.0.XX to 2.0.XX
🪄 Migrating your project automatically with refine-codemod ✨
@pankod/refine-codemod package handles the breaking changes for your project automatically, without any manual steps. It migrates your project from 1.x.x to 2.x.x.
Just cd into root folder of your project (where package.json is contained) and run this command:
npx @pankod/refine-codemod refine1-to-refine2And it's done. Now your project uses refine@2.x.x.
💪 Motivation behind breaking changes
resources
Making resources property-based instead of component-based was necessary for Nextjs support. A property is also more flexible, dynamic and easier to configure compared to a component.
routerProvider
Router layer is abstracted from the core for mainly Nextjs support. This also creates the opportunity for any other router solution to be used.
Custom Pages
This is also related to abstracting away the router layer from core. Differences between (currently two) router provider are so big that adding a layer to cover both cases (possibly more in the future) is much harder to implement and maintain compared to letting everyone handle it with their own conventions. This also has the huge benefit of allowing maximum configurability for every respective provider.