I am facing this error, can someone help in this -
Error:
*TypeError: Cannot read properties of null (reading 'useState')*

**Menu.tsx**

```
export const MainMenu: FC = () => {
    const [toogle, setToggle] = useState(false);
    return(
        <>
            <SubMenu />
            <div>
              <button onClick={() => setToggle(!toogle)}>click</button>
            </div>
        </>
    );
}

export const SubMenu: FC = () => {
    return(
        <>
           <div className="menu">
             <Image src={imgUrl} width="20" height="20" />
           </div>
           {toogle && (<span className="menu-text">{title}</span> )}  
        </>
    );
}

```

**App.tsx**

```
import { MainMenu} from '../Memu';

function App() {
  return (
    <MainMenu />
  );
}
export default App;

```