Skip to content

Instantly share code, notes, and snippets.

@aweary
Last active January 18, 2017 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aweary/8878edbda1800fe9a67122edaf342a2b to your computer and use it in GitHub Desktop.
Save aweary/8878edbda1800fe9a67122edaf342a2b to your computer and use it in GitHub Desktop.
// @flow
import { h, render } from 'preact'
type AppProps = {
// FIXME! This will cause an error right due to line 16 passing a string. Change
// this from "number" to "string" and the error goes away.
greeting: number,
};
const App = (props: AppProps) => (
<div>
<h1>{props.greeting}</h1>
</div>
)
render(<App greeting="Hello, world"/>, document.getElementById('app'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment