Hooks for use with fluent UI components
yarn add @axiscommunications/fluent-hooks
npm install @axiscommunications/fluent-hooks
import { usePageController } from "@axiscommunications/fluent-hooks";
const [skip, setSkip] = useState(0);
const [take, setTake] = useState(10);
const data = useDataCollector();
const pageController = usePageController({ total: data.length, skip, take });
<MyTable skip={skip} take={take} />
<MyTableFooter
{...pageController}
total={data.length}
take={take}
setTake={setTake}
/>
import { useMediaQuery } from "@axiscommunications/fluent-hooks";
const media = useMediaQuery();
if (media === "small"){
return <Small />
}
return <Large />