reflex-app / reflex

https://reflexapp.nickwittwer.com/
MIT License
34 stars 1 forks source link

Upgrade sync mechanism to use context isolation/best practices #191

Open nwittwer opened 3 years ago

nwittwer commented 3 years ago

The current internals for handling the synchronization of "screens" in Reflex is likely not following best practice. How could we improve it?

See: https://github.com/reflex-app/reflex/blob/dev/packages/app/src/renderer/components/Screens/WebPage.vue

https://github.com/electron/electron/blob/master/docs/tutorial/context-isolation.md#migration

nwittwer commented 3 years ago

Another idea: use something like the Broadcast Channel API or WebSockets.

Interesting implementation of the Broadcast Channel API via Vue 3's Composition API: https://pikax.me/vue-composable/composable/misc/sharedRef.html#usesharedref