DioxusLabs / dioxus

App framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.43k stars 786 forks source link

Tweak: always generate a `children` method on component prop builders #2281

Open jkelleyrtp opened 5 months ago

jkelleyrtp commented 5 months ago

Feature Request

Right now we can't hotreload component bodies going from something to nothing or nothing to something since that's functionally adding/removing a .children() method.

In debug or dev mode we should always pass in children as either some or none into the builder, even if the component doesn't do anything with those children. This would let us hotreload component bodies in more cases than we do today.

This would be breaking (might be able to find a way around it).