-
Search "redux js"
- Go to redux.js.org
- "I know I should be using that toolkit thing, where is that?"
- it's at the bottom of the navigation tree, ok, open that in a new tab
- "What's the current package name for react-redux? Is it namespaced too now?"... how do I find that... googles it instead of looking in docs, now I am on a different docs site that looks kinda the same. Package name is under "getting started" > "install".
-
Going back to redux toolkit > click API
-
A friendly abstraction over the standard Redux createStore function that adds good defaults to the store setup for a better development experience.
- lots of adjectives here but I don't know what about the defaults are good, better, or friendlier
-
-
API signatures are Typescript I guess? Kind of hard to wrap my head around them without code samples... where are those? Also these are the infamous single-letter generics, guessing "S" is state and "A" is action.
Quotes & links about testing software
From xUnit Test Patterns: Refactoring Test Code
- "Test Smells"
- "Use the Front Door First" > When all choices are equally effective we should use round trip tests to test our system under test (SUT). To do this, we test an object through it's public interface and use State Verification (page X) to determine whether it behaved correctly. If this is not sufficient to accurately describe the expected behavior we can make our tests layer-crossing tests and use Behavior Verification to verify the calls the SUT makes to depended-on components (DOCs). If we must replace a slow or unavailable DOC with a faster Test Double (page X), using a Fake Object (page X) is preferable because it encodes fewer assumptions into the test (the only assumption being t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is a very naive parser that only works on simple tables | |
// - no nesting | |
// - no cells that contain \t (tab) characters | |
// Usage: | |
// tsv` | |
// "Name" \t "Price" | |
// "Apple" \t 2.50 | |
// ` | |
function tsv(strings, ...expressions) { |
Notes on the book "Meeting Design" by Kevin Hoffman, ISBN: 1-933820-38-1
- Meeting length interferes with memory storage
- Divide into 20-30 min activities. Provide cognitive slack time to turn short term into medium term memories.
- ✘ don't serve simple sugar and carbs if providing food, serve healthy fats and proteins like nuts and cheese
- Use visuals and "manipulatives" (tactile objects like sticky notes) to engage different forms of memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs"); | |
const byline = require("byline"); | |
const camelCase = require('lodash.camelcase') | |
const inputFile = "./colors.scss"; | |
const outputFile = "./colors.js"; | |
const sassVarDeclaration = /^\$(.*)\:\s(\S*)(?:\s\!default\;|\;)$/; | |
const isReference = val => val.startsWith("$"); | |
const getReferenceName = val => val.slice(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "cmd+down", | |
"command": "editor.action.smartSelect.shrink", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "cmd+up", | |
"command": "editor.action.smartSelect.grow", |
React Bundlers/Boilerplate
- https://github.com/facebook/create-react-app For single page apps (SPAs)
- https://www.gatsbyjs.org/ Great for static sites and SPAs
- https://zeit.co/blog/next Great for server-side rendering of dynamic content
Redux Organization:
Pick one of these:
- https://reduxbundler.com/ wrapper with many utils for making a "self-healing" data layer
- https://github.com/markerikson/redux-starter-kit extra utils for setting up redux stores
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// See http://go.microsoft.com/fwlink/?LinkId=827846 | |
// for the documentation about the extensions.json format | |
"recommendations": [ | |
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | |
// General | |
"dbaeumer.vscode-eslint", | |
"christian-kohler.path-intellisense", | |
"christian-kohler.npm-intellisense", | |
"jakob101.RelativePath", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _ from 'lodash' | |
// In-memory Knex mock 🤯 | |
function DB () { | |
const db = function (table) { | |
if (!table) return db | |
db._table = table | |
if (!db._db[table]) { | |
db._db[table] = { | |
_latestId: 0, |
NewerOlder