Ask questions[react-hooks/exhaustive-deps] function outside the hook
Hi! I have some problems with [react-hooks/exhaustive-deps] rule of eslint. Can you help me, please?
I have some effect, which to call function. Linter tells me that I should add getData to dependency. But I do not want my effect to depend on the function. I will have to wrap it in useCallback which may have its own dependency.
I need my useEffect hook to be called only 1 time. But in this case, it will be called whenever id changes. How do I get around this behavior?
I have seen advice to put a function inside a hook, but this is not my case. I have to call this function from different hooks.
Answer questions vkurchatkin
You are free to ignore linter if that's what you want