human
useEffect(() => {
    localStorage.setItem("dark-mode", darkMode);
    if (darkMode) {
      document.documentElement.classList.add("dark");
    } else {
      document.documentElement.classList.remove("dark");
    }
  }, [darkMode]);

convert this react context
gpt
--- Reasoning ---
1. Is the question multiple-choice question?
No
2. Is it implied multiple-choice question?
No
3. If two experts were independently asked the question, will the final answer be exactly the same?
No

--- Answer ---
open