Skip to content

Instantly share code, notes, and snippets.

@fdjones
Created February 6, 2018 15:29
Show Gist options
  • Save fdjones/c40520c1e533fa17d95bf0756b4020a5 to your computer and use it in GitHub Desktop.
Save fdjones/c40520c1e533fa17d95bf0756b4020a5 to your computer and use it in GitHub Desktop.
// @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