I feel like not using TypeScript: I put some effort into it building a library using React.js + hooks and such and such, but unfortunately its build system is really boring compared to Rust (lack of automation and self-contained features).
I am guessing again on continuing some sort of "engine" in Rust (like my previous Agera SDK work), but using a different principle. My plan is to:
- Express visual hypertext elements as a single dispatch-based structure that represents one of multiple tags without any sort of hacky
struct
inheritance brought in, allowing for complex DOM hierarchic event handlers. - Use a hook based reactive system for creating UI components, and using a macro to build renderable nodes.
My question is now in how this node creation macro shall work. In React.js we know that a hook component is a function that may contain parameters expressed as a record { ... }
, and a JSX tag does not invoke the function by itself (I think there's some sort of dynamic typing involved here so attributes match the component parameters). In Rust how can I express that better?