How to create a custom React hook to prevent useEffect from running on initial render?
I often find myself needing to prevent useEffect from running on the initial render and only triggering it when dependencies change. To make this easier, I want to create a custom hook that handles this. How can I create such a hook in React?
React Hook “useGetCatalogueDataByIdQuery” is called conditionally. React Hooks must be called in the exact same order in every component render
I have this component where i don’t want to all api unless Catalogue id exists