React change state when time out using timestamp from the database

117 Views Asked by At

there is an element in my database that has a timestamp that represents the last time a component has been used. So, what I'd like to add is a functionality that when 20 minutes have past from the last time a component has been used React re-renders and change the color of the component. how do I give reactivity and make the website re-render when this event happens?

0

There are 0 best solutions below