This repository has been archived by the owner. It is now read-only.

Design: better pattern for inlining constant blocks of HTML #64

myitcv opened this Issue Apr 30, 2017 · 0 comments


None yet
1 participant

myitcv commented Apr 30, 2017

A better pattern for inlining constant blocks of HTML within components. This ultimately needs to take the form of some changes within the compiler (a la JSX in TypeScript). Assuming we're not going to make/rely on any language changes, we need to do this via something like react.JSX(s string) where the compiler ensures the string argument is a compile time constant (in this first instance, keep things simple), and then rewrites the AST to be the equivalent component constructor calls. In the short term, we could actually implement this at run time using and a reverse mapping from js tags to field names (and panic if there are problems)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.