Last active
March 28, 2018 01:50
-
-
Save isacjunior/6ed4a7423c30b303adf4f2113b367ba8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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, render, Component } from "preact" | |
class Title extends Component { | |
state = { | |
defaultName: 'Isac' | |
} | |
render({ name }, { defaultName }) { | |
return <h1 class='title'>{name || defaultName}</h1> | |
} | |
} | |
class App extends Component { | |
render() { | |
return <Title name='Isac Jr' /> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment