Skip to content

Instantly share code, notes, and snippets.

@rbiggs
Last active September 5, 2017 22:29
Show Gist options
  • Save rbiggs/a60873206aa1f00da3adab32df449bf9 to your computer and use it in GitHub Desktop.
Save rbiggs/a60873206aa1f00da3adab32df449bf9 to your computer and use it in GitHub Desktop.
Example of Custom Tags with props and Nesting with Composi
import {h, Component, injectElement} from 'composi'
function Welcome(props) {
return <h1>Hello, {props.name}.</h1>
}
const Button = (props) => <button>{dingo.label}</button>
function App() {
return (
<div>
<Welcome name='Sara' />
<Welcome name='Charlie' />
<Welcome name='Dave' />
</div>
)
}
// Append tags to body:
injectElement(<App />, 'body')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment