patbenatar / rbexy

A Ruby template language and component framework inspired by JSX and React
MIT License
35 stars 5 forks source link

Extract Rbexy::Component, rbexy_context, etc into separate lib? #52

Closed patbenatar closed 3 years ago

patbenatar commented 3 years ago

I think the only hard dependency between Rbexy::Component and the rbx compiler is currently the rbexy_context wrapper in compiled output. Consider replacing this with a Rbexy.config.component_preamble / postamble or Rbexy.config.component_wrapper so it could be configured from the outside.

The default rbx component resolver could just try to constantize the component name. Rbexy::Component could provide a resolver that adds Component to the end of the name before resolving.