My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

componentDidUpdate() situation

Tonny Hideyori's photo
Tonny Hideyori
·Jan 9, 2019

i have a component which update the backend after an action in frontend.I used the componentDidmount() but it fetched half of the data unless i refresh physically. so i decided to use componentDidUpdate() it updated instantly but the problem is that method keeps on calling back-end for data in every second it don't want that . i want the back end to be called after an action,then update the front-end is there any react life cycle method apart from componentDidMount() or componentDidUpdate()