Created
February 6, 2018 15:29
-
-
Save fdjones/c40520c1e533fa17d95bf0756b4020a5 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
// @flow | |
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
type Props = { | |
name: string, | |
age: number, | |
DOB: number, | |
nationality: string | |
}; | |
class App extends Component { // flow is highlighting component - too few type arguments | |
render() { | |
return ( | |
<div className="App"> | |
<header className="App-header"> | |
<img src={logo} className="App-logo" alt="logo" /> | |
<h1 className="App-title">Welcome to React</h1> | |
</header> | |
<p className="App-intro"> | |
To get started, edit <code>src/App.js</code> and save to reload. | |
</p> | |
</div> | |
); | |
} | |
} | |
function blah() { - - eslint should tell me off for this | |
return 4; | |
} | |
someFunction(); - eslint should tell me off for this | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment