Skip to content

Instantly share code, notes, and snippets.

View acousineau's full-sized avatar

Andy Cousineau acousineau

View GitHub Profile
import { useState, useEffect } from "react";
import { ConfirmDeleteModal } from "./ConfirmDeleteModal";
import { DestructiveButton, OutlineButton } from "./buttons";
import "./App.css";
function App() {
const [isOpen, setIsOpen] = useState(false);
useEffect(() => {
@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();