Skip to content

feat(router): add support for custom resource routes (#6864) - #6913

Closed
satyajeetch1991 wants to merge 1 commit into
refinedev:mainfrom
satyajeetch1991:feat/custom-resource-routes
Closed

feat(router): add support for custom resource routes (#6864)#6913
satyajeetch1991 wants to merge 1 commit into
refinedev:mainfrom
satyajeetch1991:feat/custom-resource-routes

Conversation

@satyajeetch1991

Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

Currently, refine only supports CRUD routes (list, show, create, edit) for each resource.
There is no built-in way to define additional custom routes associated with a resource.

What is the new behavior?

This PR introduces support for custom resource routes.
A new custom property is added to ResourceProps allowing developers to define additional routes alongside the default CRUD ones.

✅ Example Usage

<Refine
  resources={[
    {
      name: "posts",
      list: PostList,
      custom: [
        { path: "dashboard", component: DashboardPage },
      ],
    },
  ]}
/>

@satyajeetch1991
satyajeetch1991 requested a review from a team as a code owner August 1, 2025 07:50
@changeset-bot

changeset-bot Bot commented Aug 1, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f44745b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Aug 1, 2025

Copy link
Copy Markdown

Deploy Preview for refine-doc-live-previews failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit f44745b
🔍 Latest deploy log https://app.netlify.com/projects/refine-doc-live-previews/deploys/688c71d20acd6c0009488330

@pcfreak30

Copy link
Copy Markdown
Contributor

@satyajeetch1991 restore the jsdoc comments in the diff and remove the emoji comments the LLM you used added.

TL;DR review the PR again.

@alicanerdurmaz

Copy link
Copy Markdown
Collaborator

I'm closing this PR because it's missing a lot of things:

  1. examples/custom-test/ is not working.
  2. Next.js and Remix router implementations are missing.
  3. There's no need to canList?: boolean;.
  4. Many internal Refine hooks do not support the new implementation.

...and the list goes on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants