Skip to content

Instantly share code, notes, and snippets.

Tyler Collier tylercollier

  • Email: github2 at my first and last name dot com
  • Phoenix, AZ, USA
View GitHub Profile
View callbacks.js
// Callbacks!
// Reminder: Run this with quokka if you want to see results instantly in your editor.
// https://quokkajs.com/
// Part 1
// If I gave you an array of numbers, and told you to list just the odds, you might do this:
var numbers = [1, 2, 3, 4, 5, 6];
var odds = [];
@tylercollier
tylercollier / renderprops.js
Last active Nov 29, 2016
RenderProps challenges
View renderprops.js
// Using RenderProps (https://github.com/ReactTraining/react-subjects/blob/master/subjects/RenderProps/exercise.js),
// how can I:
//
// 1) compose multiple fetches to be run simultaneously? In the example below, fetching credits would be blocked until
// debits have been fetched.
//
// 2) test the component without the fetches happening? Normally I'll have a component that takes props, and connect it
// to redux, and export both the connected component (as default) and the so-called presentational component as a named
// const. This allows me to preview the render using e.g. React Storybook.
You can’t perform that action at this time.