Skip to main content

useRootContext

The useRootContext hook returns the root context.

Usage

import { useRootContext } from from "@newfold/ui-component-library";

const Component = () => {
const { isRtl } = useRootContext();

return <div className={ isRtl ? "nfd-ml-4" : "nfd-mr-4" } />
};

Learn more about the Root component.

Hello From Root