- Gecko Reflow Visualization
- css-stacking-contexts-wtf
- critical-rendering-path
- why-do-browsers-match-css-selectors-from-right-to-left
- getting-started-with-the-webkit-layout-code
- improving-css-performance-fixed-position-elements
- BlinkOn 5: Paint and Compositing Deep Dive
- a-quick-overview-of-chromes-rendering-path
- [render-blocking-css](https://developers.google.com/web/fundamentals/performance/critical-rendering-path/render-b
This file contains hidden or 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
| // fake reselect | |
| const createSelector = (deps, body) => (state, props) => | |
| body(...deps.map(dep => dep(state, props))); | |
| const createStructuredSelector = scheme => (state, props) => | |
| Object.keys(scheme).reduce((result, key) => ({ | |
| ...result, | |
| [key]: scheme[key](state, props) | |
| }), {}); |
This file contains hidden or 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 { createActions, handleActions, combineActions } from "redux-actions"; | |
| import { call, put, takeLatest } from "redux-saga/effects"; | |
| import { api } from "../../helpers"; | |
| import { Root } from "../../redux"; | |
| /* | |
| * TYPES | |
| * -------------------------------------------------------------- | |
| */ | |
| enum requestStatusEnum { |
This file contains hidden or 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
| export default function reducer(state={ | |
| data: [] | |
| }, action) { | |
| switch(action.type) { | |
| case "ACTION_SUCCESS": { | |
| return {...state, data: action.payload} | |
| } | |
| return state; | |
| } |
This file contains hidden or 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
| export function typicalAction(loadingCb, successCb, failCb) { | |
| return function(dispatch) { | |
| loadingCb(); | |
| fetch(`http://someapi/user`) | |
| .then((response) => { | |
| dispatch({type: "ACTION_SUCCESS", payload: response}); | |
| successCb(); | |
| }) |
This file contains hidden or 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 React from "react"; | |
| import { connect } from "react-redux"; | |
| import { bindActionCreators } from "redux"; | |
| import * as actions from "./actions.js"; | |
| @connect((store) => { | |
| return { | |
| someStore: store.someStore, | |
| }; | |
| }, |
This file contains hidden or 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 React from "react"; | |
| import { connect } from "react-redux"; | |
| import { bindActionCreators } from "redux"; | |
| import * as actions from "./actions.js"; | |
| @connect((store) => { | |
| return { | |
| someStore: store.someStore, | |
| }; | |
| }, |
This file contains hidden or 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
| export default function reducer(state={ | |
| groups: [], | |
| group: null, | |
| groupsFetchPending: false, | |
| groupsFetchSuccess: null, | |
| groupFetchPending: false, | |
| groupFetchSuccess: null, | |
| groupNewPending: false, | |
| groupNewSuccess: null, | |
| groupNewPending: false, |
This file contains hidden or 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
| export default function reducer(state={ | |
| data: [], | |
| requestSuccess: false, | |
| requestPending: false, | |
| requestFail: false | |
| }, action) { | |
| switch(action.type) { | |
| case "ACTION_PENDING": { | |
| return {...state, requestPending: true} | |
| } |
This file contains hidden or 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
| export function typicalAction() { | |
| return function(dispatch) { | |
| dispatch({type: "ACTION_PENDING"}); | |
| fetch(`http://someapi/user`) | |
| .then((response) => { | |
| dispatch({type: "ACTION_SUCCESS", payload: response}); | |
| }) | |
| .catch((err) => { | |
| dispatch({type: "ACTION_FAIL", payload: err }); |
NewerOlder