react: myitcv.io/react/jsx Index | Files

package jsx

import "myitcv.io/react/jsx"

Package jsx allows you to render blocks of HTML as myitcv.io/react elements. It is a temporary runtime solution for what will become a compile-time transpilation, much like JSX's relationship with Javascript.

For more information see https://github.com/myitcv/react/wiki

Index

Package Files

gen_jsx_coreGen.go gen_jsx_cssGen.go jsx.go util.go

func HTML Uses

func HTML(s string) []react.Element

HTML is a runtime JSX-like parsereact. It parses the supplied HTML string into myitcv.io/react element values. It exists as a stop-gap runtime solution to full JSX-like support within the GopherJS compilereact. It should only be used where the argument is a compile-time constant string (TODO enforce this within reactVet). HTML will panic in case s cannot be parsed as a valid HTML fragment

func HTMLElem Uses

func HTMLElem(s string) react.Element

HTMLElem is a convenience wrapper around HTML where only a single root element is expected. HTMLElem will panic if more than one HTML element results

func Markdown Uses

func Markdown(s string) []react.Element

Markdown is a runtime JSX-like parser for markdown. It parses the supplied markdown string into an HTML string and then hands off to the HTML function. Like the HTML function, it exists as a stop-gap runtime solution to full JSX-like support within the GopherJS compilereact. It should only be used where the argument is a compile-time constant string (TODO enforce this within reactVet). Markdown will panic in case the markdown string s results in an invalid HTML string

Package jsx imports 7 packages (graph) and is imported by 3 packages. Updated 2018-05-28. Refresh now. Tools for package owners.