alexa

Hook cannot be called inside a callback in React.js ?

Hook cannot be called inside a callback in React.js ?

You 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)
}

210 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online

Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry