I have a class instance variable that I create using new operator. I want this to be created only once throughout the lifecycle of a React functional component. Should I create it outside the component or inside useEffect or use useMemo or some other way?