{"record":{"id":"8b9c392af2d83159","repo":"refinedev/refine","slug":"no-resource-and-fallbackto-is-found-no-navigati","errorCode":null,"errorMessage":"No resource and \"fallbackTo\" is found. No navigation will be made.","messagePattern":"No resource and \"fallbackTo\" is found\\. No navigation will be made\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/react-router/src/navigate-to-resource.tsx","lineNumber":42,"sourceCode":"    const path = getToPath({\n      resource: toResource,\n      action: \"list\",\n      meta,\n    });\n\n    if (path) {\n      return <Navigate to={path} />;\n    }\n\n    return null;\n  }\n\n  if (fallbackTo) {\n    console.warn(`No resource is found. navigation to ${fallbackTo}.`);\n    return <Navigate to={fallbackTo} />;\n  }\n\n  console.warn(\n    'No resource and \"fallbackTo\" is found. No navigation will be made.',\n  );\n  return null;\n};\n","sourceCodeStart":24,"sourceCodeEnd":47,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/react-router/src/navigate-to-resource.tsx#L24-L47","documentation":"Warned by `NavigateToResource` in @refinedev/react-router in the worst case: the resource cannot be resolved AND no `fallbackTo` prop was given. The component returns null — nothing renders and no navigation happens, typically leaving a blank page on an index route. This is a configuration gap: neither the resource path nor an escape hatch exists.","triggerScenarios":"Rendering <NavigateToResource /> with a resource that isn't resolvable (missing from resources, no list route/meta) and without the optional `fallbackTo` prop.","commonSituations":"Copying <NavigateToResource /> from examples without passing fallbackTo; resource list emptied or renamed (e.g. after role-based filtering) so the default target disappears; blank-page bug reports on the index route.","solutions":["Fix the resource resolution (correct name in toResource, and a list route on the resource)","Always pass `fallbackTo=\"/dashboard\"` (or another always-valid route) as a safety net","If intentional (e.g. empty home), render your own placeholder instead of NavigateToResource"],"exampleFix":"// before\n<NavigateToResource />\n// after\n<NavigateToResource toResource=\"dashboard\" fallbackTo=\"/dashboard\" />","handlingStrategy":"validation","validationCode":"if (!resolveToPath(toResource) && !fallbackTo) {\n  throw new Error('NavigateToResource: no resolvable resource and no fallbackTo');\n}","typeGuard":"const isSafeToRender = (toResource: string, fallbackTo?: string) =>\n  Boolean(resolveToPath(toResource) || fallbackTo);","tryCatchPattern":null,"preventionTips":["Never render NavigateToResource without fallbackTo in production apps","Guard role-conditional resource registration so the redirect target always exists"],"tags":["navigation","react-router","resources","blank-page","refine"],"backgroundTag":"route-resource-not-found","analyzedSha":"779d52a20e29b0307ac0df04d135beba434370dc","analyzedAt":"2026-08-27T11:15:25.854Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}