Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. // @flow
  2. import { h, render } from 'preact'
  3.  
  4. type AppProps = {
  5. // FIXME! This will cause an error right due to line 16 passing a string. Change
  6. // this from "number" to "string" and the error goes away.
  7. greeting: number,
  8. };
  9.  
  10. const App = (props: AppProps) => (
  11. <div>
  12. <h1>{props.greeting}</h1>
  13. </div>
  14. )
  15.  
  16. render(<App greeting="Hello, world"/>, document.getElementById('app'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement