Plotly React update chart not working

Can someone provide an example to update a Plot using the React package?

I’ve tried assigning the revision prop to a state var and then updating the var but it doesn’t update the chart. I have also tried the same method, but using layout.datarevision.

Using this as a reference: https://github.com/plotly/react-plotly.js/#refreshing-the-plot