use this hook to gain access to mode state and setter.
Example
const {resolvedMode, setMode} = useMode(options);
Source
Source code
exportconstuseMode = (): UseModeYeild=> { const [{ m, s }, setState] = useStore(); /** Set user preference */ return { mode:m, systemMode:s, resolvedMode: (m === SYSTEM ? s : m) asResolvedScheme, setMode: (m: ColorSchemePreference) =>setState({ s, m }), }; };
use this hook to gain access to mode state and setter.
Example
Source