Inertia 2: Defer with Polling?
I have a dashboard that makes an API call to an external service and I'm using polling to refresh the data every 10 seconds. The request takes about 5 seconds and so once the page has completed its initial load, the polling does exactly what you'd expect and the data refreshes as those polled requests complete. However, waiting for that initial page load is rough and so I had hoped to use Inertia's defer method for a quick initial page load with skeleton loaders in the fallback state. However, with each polling attempt, my page reverts to the fallback state, creating a far less desirable effect in which it's constantly alternating between a loading state and the refreshed data. Is there a way to only defer on the first page load and then turn it off once my props have been hydrated?
Please or to participate in this conversation.