Recalculate frontend from State
I've been using pynecone to develop a interface for some weeks now and must say I'm really enjoying the reduced complexity from dealing directly with react and chakra.
My current issue: I'm trying to present a text stream to pynecone. As the file gets updated/appended to, I need it to refresh automatically.
I've explored a several of possibilities of updating through a callback like: having the callback call a function that would normally cause the pc.var's to update; setting the state of the vars to dirty so that they would be eventually updated.
I've also tried to do it through an async yield loop to refresh the file but that seems to block the interaction with the rest of the page.
Is this currently possible to do with the framework? Is it planned to be supported? Is it possible to force an update through react?
The async & yield syntax was introduced in event handlers to solve streaming problem in a better way, so it should be the intended way.
The fact that it is blocking other interactions is a problem that we need to solve, and it will be a high priority I think.
Currently a limitation in Pynecone is that only one event handler can be running at a time, which is why the yield method is blocking the frontend. We need to add a feature to allow async background events to support live streaming like this.
We will make this a high priority feature to add soon as it enables many possibilities for realtime / live-updating apps.