HomeBlogHook cannot be called inside a callback in React.js ?Problem and SolutionsHook cannot be called inside a callback in React.js ?By M.K. Verma · 2 May 2022You can put your API call inside a callback and call it inside your selectbox handler. example: const apiCall = (item) => { // api call logic } const handleSelectBox = (selectedItem)=> { apiCall(selectedItem) }Share this:CommentsLeave a commentPost