Skip to content Skip to sidebar Skip to footer

React Componentdidmount Not Called On Component Reload

I have a list of data table. In data table I have data w.r.t to some device Whenever I click ID I open a sidebar with some data displaying inside that. The problem what I am facing

Solution 1:

If you want your component to re-mount when deviceId change you can use the key prop on ComplianceDetails, like this :

<ComplianceDetails key={deviceId} deviceId={deviceId} />

Post a Comment for "React Componentdidmount Not Called On Component Reload"