I hereby claim:
- I am neurosnap on github.
- I am neurosnap (https://keybase.io/neurosnap) on keybase.
- I have a public key ASD15DIHe4ANJndK6jBxMLOtAD35MP78OGTKphHnJqByIQo
To claim this, I am signing this object:
// actionCreator.js | |
export default (type: string) => (payload: Object) => ({ type, payload }); | |
// Examples | |
export const FETCH_THREADS = 'threadFetch/FETCH'; | |
export const fetchThreads = actionCreator(FETCH_THREADS); | |
export const FETCH_NEXT_PAGE = 'threadFetch/FETCH_NEXT_PAGE'; | |
export const fetchNextPage = actionCreator(FETCH_NEXT_PAGE); |
describe('getFolderCount', () => { | |
const getFolderCount = selectors.getFolderCount; | |
before(() => { | |
sinon.stub(selectors, 'getDisplayFolderProp'); | |
sinon.stub(selectors, 'getFoldersHash'); | |
sinon.stub(selectors, 'calcFolderCount'); | |
sinon.stub(coreSelectors, 'getMailboxes'); | |
sinon.stub(coreSelectors, 'getThreadIdsByFolder'); | |
getFolderCount({}, {}); | |
}); |
/* REDUCER MIDDLEWARE */ | |
export const PluginMiddleware = (actionTypes) => store => next => action => { | |
action.actionTypes = actionTypes; | |
return next(action); | |
} | |
// example reducer | |
const counter = (state, action) => { | |
const actionTypes = action.actionTypes; |
const handler = { | |
get(target, name) { | |
return name; | |
}, | |
}; | |
const actionTypeCreator = new Proxy({}, handler); | |
const { ADD_SOMETHING, REMOVE_SOMETHING } = actionTypeCreator; |
I hereby claim:
To claim this, I am signing this object:
import * as React from 'react'; | |
import axios from 'axios'; | |
import { connect } from 'react-redux'; | |
import { getFormSubmitErrors } from 'redux-form'; | |
+ import { push } from 'react-router-redux'; | |
import { globals, GridContainer } from '@shared/atoms'; | |
import styled from '@shared/ui'; | |
import { buildFormData } from '@shared/lib/formatters'; |
const RESULT = "RESULT"; | |
const isResult = obj => obj && obj.type === RESULT; | |
const Result = value => ({ | |
type: RESULT, | |
value | |
}); | |
const NOTHING = "NOTHING"; | |
const isNothing = obj => obj && obj.type === NOTHING; | |
const Nothing = value => ({ |
import createTable from './slice-map'; | |
import createIndexMany from './create-index'; | |
import createPrimitive from './slice-assign'; | |
import createLoaderTable from './slice-loading-map'; | |
const createIndex = (p: any) => createTable<{ [key: string]: string }>(p); | |
interface User { | |
id: string; | |
email: string; |
import Phaser from 'phaser'; | |
class MainScene extends Phaser.Scene { | |
_player: Phaser.GameObjects.Sprite | null; | |
_cursors: Phaser.Types.Input.Keyboard.CursorKeys | null; | |
_layer: Phaser.Tilemaps.StaticTilemapLayer | null; | |
constructor() { | |
super({ | |
key: 'MainScene', |
const ee = emitter(); | |
ee.on(function* clicker() { | |
while (true) { | |
const event = yield take('click'); | |
console.log('click event!', event); | |
} | |
}); | |
ee.on(function* once() { | |
const event = yield take('click'); | |
console.log('on listen for event once!', event); |