Skip to content

Instantly share code, notes, and snippets.

View acousineau's full-sized avatar

Andy Cousineau acousineau

View GitHub Profile
@acousineau
acousineau / ReduxSelectorPattern.js
Last active September 27, 2017 13:47
Redux Selector Pattern Primer and Flow
// MyComponent.js
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchTheThings } from 'actions';
import { selectAsyncProp } from 'index-reducer';
class MyComponent extends Component {
componentDidMount() {
this.props.fetchTheThings();