mayu-live / framework

Mayu is a live updating server-side component-based VDOM rendering framework written in Ruby
https://mayu.live
GNU Affero General Public License v3.0
130 stars 4 forks source link

Stateless components #57

Open aalin opened 1 year ago

aalin commented 1 year ago

Components that don't implement any callbacks don't have to be instantiated.

I think there is a type called LambdaComponent that we just need to check for somewhere in lib/mayu/vdom/vtree.rb or maybe we could do it in vnode.rb


Could maybe also not instantiate descriptors for text elements and comments... Or maybe implement lighter descriptors for them since they don't have props, keys nor children...


It would be good to do #56 first