Skip to content

Instantly share code, notes, and snippets.

View fdjones's full-sized avatar

Freddie fdjones

View GitHub Profile
my-MBP:create-react-app-flow me$ npm i
> [email protected] install /Users/me/Documents/code/create-react-app-flow/node_modules/fsevents
> node install
[fsevents] Success: "/Users/me/Documents/code/create-react-app-flow/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" alrea
dy installed
Pass --update-binary to reinstall or --build-from-source to recompile
> [email protected] postinstall /Users/me/Documents/code/create-react-app-flow/node_modules/uglifyjs-webpack-plugin
{
"name": "project-manager",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-scripts": "1.1.0"
},
"scripts": {
// @flow
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
type Props = {
name: string,
age: number,
DOB: number,
// @flow
import React from 'react';
type Props = {
tasks: Array<Object>,
};
type State = {
isInProgress: boolean
// @flow
import React from 'react';
type Props = {
tasks: Array<Object>,
};
type State = {
isInProgress: boolean
// @flow
import React from 'react';
type Props = {
tasks: Array<Object>,
};
type State = {
isInProgress: boolean
class Task extends React.Component {
constructor(props: Object) {
super(props);
this.state = { isInProgress: true };
this.updateStatus = this.updateStatus.bind(this);
}
updateStatus = function () {
this.setState({ isInProgress: !this.state.isInProgress });
}
render() {
import React from 'react';
import Task from './Task';
// type tTask = {
// title: string,
// details: string,
// ID: number
// }
// type tProps = {
import React, { Component } from 'react';
// type tTask = {
// title: string,
// details: string,
// }
class Task extends Component {
Blah.propTypes = {
someObj = {
name: PropTypes.string,
age: PropTypes.number
}
}