DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.32k stars 779 forks source link

Make VirtualDom `Send` or provide `Send` variant #130

Closed jkelleyrtp closed 1 year ago

jkelleyrtp commented 2 years ago

The VirtualDom is not Send which makes it challenging to hold across await points in web frameworks for liveview or SSR.

Either we need to develop our own web framework (with the same level of ergonomics of Diouxs) or somehow get the VirtualDom threadsafe to Send across threads.

jkelleyrtp commented 1 year ago

This is too hard. The best you can do is use a ThreadPool and communicate with a running instance from there. And, in reality, it's not bad. We should definitely provide a pool for this as a first-party crate.