Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // @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;
Add Comment
Please, Sign In to add comment