I have app where I have multiple calls to a hook, to simplify the example let's assume it looks like this:
const Test = () => {
...
useTest();
useTest();
....
}
and let's assume that useTest looks like that:
export default function useTest() {
useEffect(() => {
console.log('test');
})
}
how I can make the console.log to be run only once in given render/rerender phase no matter how many times this hook is called?