For React Applications and Others
Brevity, but not at the expense of clarity
Consistency, but not at the expense of improvement
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
import _ from 'lodash'; | |
/** | |
* Wraps a function to cache the result | |
* no matter what props are passed | |
* only caches the result if it isn't empty | |
* | |
* This is just using a closure for caching. | |
* If the function is declared again, the value will be lost. | |
*/ |
import { useEffect, useState } from 'react' | |
/** | |
* makes a `rect` object available to a component based on the | |
* dimensions of DOM object using a reference | |
* | |
* Usage: | |
* const MyComponent = (props) => { | |
* const _ref = useRef(null) | |
* const rect = useRect(_ref) |
from base64 import b64encode | |
from hashlib import sha1 | |
import hmac | |
def hash_signature(url, association_id, secret_access_key, session_id=None): | |
""" | |
Process from Membersuite Docs: http://bit.ly/2eSIDxz | |
""" |
Parent-child pull-downs | |
======================= | |
I need a way to generate a set of pulldowns that can populated based on what's selected in the parent. | |
Required Functionality | |
---------------------- | |
- can be initially populated with the existing value | |
- assumes unique id's at every level (not going to cater to that kinda craziness) |