Skip to content

Instantly share code, notes, and snippets.

@fourestfire
fourestfire / newsheet
Created February 4, 2018 19:31
rows of new sheet
sheet id 5148189662701444
columns:
[ { id: 5631893115824004,
index: 0,
title: 'id',
type: 'TEXT_NUMBER',
primary: true,
validation: false,
width: 150 },
@fourestfire
fourestfire / React-Redux Patterns.md
Last active April 7, 2017 03:38
Boilerplate for react-redux implementation, including react-router

React-Redux Patterns and Boilerplate

Constants, Action Creators (sync), Reducers, and Action Creators (async)

/* -------------------<   ACTIONS   >--------------------- */
const MY_ACTION = 'MY_ACTION';


/* ---------------<   ACTION CREATORS   >------------------- */
@fourestfire
fourestfire / React-Redux Notes.md
Last active April 7, 2017 03:38
Quick notes around redux-react implementation (boilerplate in separate file)

React-Redux Notes

Stuck?

  • Map is not a function? Props are either named incorrectly or not getting passed down properly.
    • Keep in mind props (for ui component) vs this.props (stateful component)
  • Did you bind your function?
  • To access value on forms without keeping track of it on state, we can use event.target.property.value
  • When you're doing a map, remember to return inside the map, and remember to set a key!

React-Redux Implementation Checklist

@fourestfire
fourestfire / Express & Sequelize Boilerplate.md
Last active April 7, 2017 14:55
Common code patterns for express and sequelize

Sequelize Boilerplate (/models folder)

in db:
const Sequelize = require('sequelize');
const chalk = require('chalk');
console.log(chalk.yellow('Opening connection to PostgreSQL'));

// create the database instance
const db = new Sequelize('postgres://localhost:5432/name_of_database', {