Hello Sandpack

import { useState, useEffect } from "react"

export default function App() {
  const [a, setA] = useState("");

  useEffect(() => {
    console.log(a);
    // This should give a warning
  }, []);
  
  if(a) {
    // This should give an error
    const foo = useState()
  }

  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <h2>Start editing to see some magic happen!</h2>
    </div>
  );
}