Skip to content

Instantly share code, notes, and snippets.

View jbachhardie's full-sized avatar

Jae Anne Bach Hardie jbachhardie

View GitHub Profile
@jbachhardie
jbachhardie / aaction.tsx
Last active March 3, 2023 19:09
Safe Async in React
const action = {
type: "FETCH_RESOURCE",
};
const asyncAction = () => createAsyncAction(action, fetchResource);
const isPending = makeIsPendingSelector(action.type, '', true);
const isFailed = makeErrorSelector(action.type)
@jbachhardie
jbachhardie / 0_reuse_code.js
Created February 16, 2017 11:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console