Is it safe to use such a pattern:
const appLoaders = useMemo(() => React.createRef(), [])
The thing is I use this ref in useEffect and it is needed in the dependency array (exhaustive-deps). The above pattern does the trick and everything seems to work - without the memo, when I put the ref in the dependency array the app was in constant rerender.
I am just wondering if there are some 'traps' that will surprise me in certain circumstances.