API Reference
Advanced Tutorials
Comparison
FAQ
Contributing
Testing
Migration Guide
Licence
This is documentation for Refine 3.xx.xx, which is no longer actively maintained.
For up-to-date documentation, see the latest version (5.xx.xx).
Version: 3.xx.xx
useResourceWithRoute
useResourceWithRoute is used to get the resource object in resources array that you defined in <Refine> by route name.
The hook is used internal in refine. Normally you don't need this hook, but we export it as it may be useful for some use-cases.
import { useResourceWithRoute } from "@pankod/refine-core";
const resourceWithRoute = useResourceWithRoute();
const resource = resourceWithRoute("posts");
API Reference
Return value
| Description | Type |
|---|---|
| resourceWithRoute | (route: string) => IResourceItem |
Was this helpful?