React Pattern: Extract Child Components to Avoid Binding
Cory House

Could you suggest me with an optimal solution in the following scenario :

The parent fetches data from an endpoint and passes the relevant data to the children as props. Children display the data and the user interacts with it which sends another post/update/ delete request to the API which changes the database accessed by API. At this point, the child is showing the previous data. I need a hook at the parent component to refetch the data from API again and re render it so that user can see the new data. Presently I passed a bound function as prop which fetches the data and updates the state at parent component. But I feel it’s inefficient.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.