Reactjs – How can i save dark light mode in local storage with typescript?
import { createContext, useState } from "react"; export interface TypeContext { darkMode: true | false; setDarkMode: React.Dispatch<React.SetStateAction<boolean>>; toggleMode: () => void; } export interface TypeChildrenProps { children: JSX.Element; } export const GlobalThemeContext = createContext<TypeContext>({ darkMode: false, setDarkMode: () => {},…