UNPKG

@etsoo/toolpad

Version:

Dashboard framework extention based on Toolpad Core

25 lines (20 loc) 383 B
import * as React from "react"; function subscribe() { return () => {}; } function getSnapshot() { return false; } function getServerSnapshot() { return true; } /** * Returns true when serverside rendering, or when hydrating. */ export default function useSsr() { return React.useSyncExternalStore<boolean>( subscribe, getSnapshot, getServerSnapshot ); }