Skip to content

Instantly share code, notes, and snippets.

View jrobber's full-sized avatar
💭
Working in private repos

Jeremy Robertson jrobber

💭
Working in private repos
View GitHub Profile
@jasonswearingen
jasonswearingen / redux-simple-router-example.tsx
Last active October 31, 2017 19:37
A simplified example of redux + redux-simple-router using Typescript
/**
WHAT: A very simple example of redux + redux-simple-router using Typescript.
WHY: The official example found here: https://github.com/rackt/redux-simple-router/tree/1.0.2/examples/basic has problems:
1) it is spread over many files making it very hard to "skim"
2) it is organized by function, not by feature. (Example: learning "how to manipulate redux state" is spread over 5 files in 4 folders)
3) there are no comments explaining what's going on/why.
WHO: by [email protected]
@proko
proko / hostedFields.js
Created November 3, 2019 16:37
React hook for Braintree Hosted Fields
import { useState, useEffect } from 'react';
import client from 'braintree-web/client';
import hostedFields from 'braintree-web/hosted-fields';
const fieldsInnerStyles = {
input: {
'font-size': '14px',
},
'input.invalid': {
color: 'red',