{"record":{"id":"f9ec726350a8d4e9","repo":"refinedev/refine","slug":"unsupported-properties-are-found-in-routerprovide","errorCode":null,"errorMessage":"Unsupported properties are found in `routerProvider` prop. You provided `${otherProps.join(\", \")}`. Supported properties are `${bindings.join(\", \")}`. You may wanted to use `legacyRouterProvider` prop instead.","messagePattern":"Unsupported properties are found in `routerProvider` prop\\. You provided `(.+?)`\\. Supported properties are `(.+?)`\\. You may wanted to use `legacyRouterProvider` prop instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/core/src/definitions/helpers/check-router-prop-misuse/index.ts","lineNumber":16,"sourceCode":"import type { RouterProvider } from \"../../../contexts/router/types\";\n\nexport const checkRouterPropMisuse = (value: RouterProvider) => {\n  // check if `routerProvider` prop is passed with legacy properties.\n  // If yes, console.warn the user to use `legacyRuterProvider` prop instead.\n  const bindings = [\"go\", \"parse\", \"back\", \"Link\"];\n\n  // check if `value` contains properties other than `bindings`\n  const otherProps = Object.keys(value).filter(\n    (key) => !bindings.includes(key),\n  );\n\n  const hasOtherProps = otherProps.length > 0;\n\n  if (hasOtherProps) {\n    console.warn(\n      `Unsupported properties are found in \\`routerProvider\\` prop. You provided \\`${otherProps.join(\n        \", \",\n      )}\\`. Supported properties are \\`${bindings.join(\n        \", \",\n      )}\\`. You may wanted to use \\`legacyRouterProvider\\` prop instead.`,\n    );\n\n    return true;\n  }\n\n  return false;\n};\n","sourceCodeStart":1,"sourceCodeEnd":29,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/core/src/definitions/helpers/check-router-prop-misuse/index.ts#L1-L29","documentation":"Warned by `checkRouterPropMisuse` in @refinedev/core when the `routerProvider` prop on `<Refine>` contains keys that are not in the current supported binding list. After v4/'legacy' split, `routerProvider` only accepts a narrow set of bindings; full legacy router objects must go to the `legacyRouterProvider` prop. The warning lists the offending keys and the supported ones.","triggerScenarios":"Passing a legacy router provider object (with keys like `BrowserRouter`, `HashRouter`, `Link`, `useLocation`, etc.) to the new `routerProvider` prop, or otherwise including any key not present in the `bindings` allow-list of checkRouterPropMisuse.","commonSituations":"Upgrading refine v3/v4 projects to v4.x+ where the provider API was split; hand-written router providers not trimmed to the binding interface; copy-pasting old examples into a new project.","solutions":["Move the legacy provider object to the `legacyRouterProvider` prop: `<Refine legacyRouterProvider={...}>`","If you intended the new API, remove the unsupported keys and keep only the documented binding properties in `routerProvider`","Use an official provider package (e.g. @refinedev/react-router-v6) and pass it exactly as its docs show"],"exampleFix":"// before\n<Refine routerProvider={legacyRouterProvider} />\n// after\n<Refine legacyRouterProvider={legacyRouterProvider} />","handlingStrategy":"type-guard","validationCode":"const allowed = ['goBack','parse','Link','useLocation','useNavigate','useParams','useSearchParams','prompt','Outlet','useHref'];\nconst bad = Object.keys(routerProvider).filter((k) => !allowed.includes(k));\nif (bad.length) console.warn('legacy keys on routerProvider:', bad);","typeGuard":"const isLegacyProvider = (p: Record<string, unknown>) =>\n  Object.keys(p).some((k) => ['BrowserRouter','HashRouter','MemoryRouter','NavLink'].includes(k));","tryCatchPattern":null,"preventionTips":["Read the v4 migration guide before upgrading — provider split is the top footfall","Use official router provider packages instead of hand-rolled ones"],"tags":["router-provider","refine","upgrade","legacy","props-misuse"],"backgroundTag":"wrong-prop-legacy-api-migration","analyzedSha":"779d52a20e29b0307ac0df04d135beba434370dc","analyzedAt":"2026-08-27T11:15:25.854Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}