Skip to main content
Version: 3.xx.xx


<CanAccess /> is a wrapper component that uses useCan to check for access control. It takes the parameters that can method takes and also a fallback. It renders its children if the access control returns true and if access control returns false renders fallback if provided.

import { CanAccess } from "@pankod/refine-core";
params={{ id: 1 }}
fallback={<CustomFallback />}
<YourComponent />

API Reference