UNPKG

piral-core

Version:

The core library for creating a Piral instance.

11 lines 416 B
import { useGlobalStateContext, useSetter } from '../hooks'; /** * The component capable of setting a layout component at mounting. */ export function SetComponent({ name, component, }) { const { setComponent } = useGlobalStateContext(); useSetter(() => component && setComponent(name, component)); // tslint:disable-next-line:no-null-keyword return null; } //# sourceMappingURL=SetComponent.js.map