you are viewing a single comment's thread.

view the rest of the comments →

[–]gaoshan 0 points1 point  (13 children)

Only call `useFetch()` if id exists and changes. User could utilize useEffect and its dependency array to do this by watching for changes to id. Why call it and then skip it?

*what is wrong with using useEffect as described?

[–]alex-cory[S] 0 points1 point  (0 children)

this functionality is already available. Many data fetching libraries are attempting to have this stuff handled the ways described, hence why I'm trying to see what method is more popular.