Skip to content

Instantly share code, notes, and snippets.

View gregegan's full-sized avatar

gregan gregegan

  • Warbler Labs
  • San Francisco
  • 13:17 (UTC -12:00)
  • X @gregan8
View GitHub Profile
@gregegan
gregegan / package-lock.json
Created November 11, 2020 23:48
package-lock.json
This file has been truncated, but you can view the full file.
{
"name": "the-landing",
"version": "0.1.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "the-landing",
"version": "0.1.0",
"dependencies": {
@gregegan
gregegan / package.json
Created November 11, 2020 23:47
package.json
{
"name": "the-landing",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start -p $PORT",
"lint": "eslint ./src",
"lint:fix": "eslint ./src --fix"
[ignore]
.*/node_modules/*.
[include]
[libs]
node_modules/iflow-redux/index.js.flow
node_modules/iflow-redux-actions/index.js.flow
[options]
esproposal.decorators=ignore
@gregegan
gregegan / TodoFlow.js
Last active May 11, 2016 20:26
constants/TodoFlow.js
// @flow
export type Todo = {
text: string,
completed: boolean,
id: number
};
export type Todos = Array<Todo>;
// @flow
import React, { Component } from 'react'
import { connect } from 'react-redux'
import {
addTodo,
deleteTodo
} from './TodoActions'
import type { Dispatch } from 'redux';
@gregegan
gregegan / index.js
Last active May 11, 2016 20:24
actions/index.js
// @flow
import { createAction } from 'redux-actions';
import * as types from '../constants/ActionTypes'
export const addTodo: createAction = createAction(types.ADD_TODO, (text: string): {text: string} => ({ text }));
export const deleteTodo: createAction = createAction(types.DELETE_TODO, (id: number): {id: number} => ({ id }));
@gregegan
gregegan / todos.js
Last active May 22, 2016 19:34
reducers/todos.js
// @flow
import { handleActions } from 'redux-actions';
import { ADD_TODO, DELETE_TODO } from '../constants/ActionTypes.js';
import { Todos, Todo } from '../constants/TodoFlow.js';
export const TodosInitialState: Todos = [
{
text: 'Use Redux',
completed: false,
id: 0