| Mitosis is indeed one of the inspirations for the project. I was initially considering to use their AST especially for the ability of transpiling to React/Vue/Svelte. Of course the goals of Mitosis and Reka are different; and in particular - I wasn't quite sure about some parts of their AST where it seems to represent expressions as code in strings instead of individual AST nodes. For example, let's say we have the following element: <button type={state.someVariable} /> In Mitosis, the value for the "type" prop will { "code": "state.someVariable" }. In Reka, the value would be an AST node { "type: "MemberExpression", ... }. Which means, when I have to evaluate the AST on runtime - if using Mitosis, I would have to either parse this expression first before I can do anything with it, or use something like eval() which requires the consumer to enable "unsafe-eval" in their CSP of their application, which feels like a big ask. The first option seems more reasonable than the second one, but it also means I have one extra step to do on evaluation and I will have to include the parser as a runtime dependency. Furthermore, I feel like having everything as an AST node feels a bit easier to work with. For example, you probably don't want your end-users of your page editor to interact with code directly; you probably want to build some UIs to make it easier for them; in which case it's easier to build UIs when you already have the AST nodes rather than on code that's not yet passed. |