For a school project I need to give bikers directions based on the value I get from a sensor. The sensor is able to send PUT requests to a db, with a value that is true or false. I'm using Fetch Suspense to retrieve that object from the db. And I use the value of that object in an if else statement.
The fetch methode works just fine, so does the PUT requests.
The problem however is that I can only see the change of true->false or visa versa when I refresh the page.
Is there any way to re-render the application with Fetch Suspense?
Any help would be greatly appreciated !
https://codesandbox.io/embed/mystifying-wing-hsgf1?fontsize=14