Skip to content
This repository was archived by the owner on Aug 27, 2018. It is now read-only.
This repository was archived by the owner on Aug 27, 2018. It is now read-only.

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

Open
@myitcv

Description

@myitcv

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 https://godoc.org/golang.org/x/net/html and a reverse mapping from js tags to field names (and panic if there are problems)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions