Last active
September 5, 2017 22:29
-
-
Save rbiggs/a60873206aa1f00da3adab32df449bf9 to your computer and use it in GitHub Desktop.
Example of Custom Tags with props and Nesting with Composi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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