usePluggableView
Installation
import { usePluggableView } from 'uxp/components';Signature
function usePluggableView(declaration: Omit<PluggableViewDeclaration, 'props'>): (props?: Record<string, any>) => React.ReactNodeExamples
typescript
const renderOtherDetails = usePluggableView({
viewId: `${App}/details/other`,
parentViewId: `${App}/details`,
defaultPage: OtherDetails
});
// Use in render:
return (
<div>
{renderOtherDetails({
location: item,
loading,
isPreview
})}
</div>
);Last updated