Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jondashkyle on github.
  • I am jkm (https://keybase.io/jkm) on keybase.
  • I have a public key ASDQ_bJp2caeHkpTuwoE9eZ5bdxr5cPkibnOHrl5VmBbQwo

To claim this, I am signing this object:

@jondashkyle
jondashkyle / machine.js
Last active February 5, 2021 20:25
Generated by XState Viz: https://xstate.js.org/viz
const onboardingMachineConfig = Machine(
{
key: 'onboarding',
initial: 'disconnected',
context: {
ensLabel: '',
walletAddress: '',
writeAmount: 0,
isTokenCanvasLoaded: false,
isENSAvailable: false,
@jondashkyle
jondashkyle / switch.js
Last active April 8, 2021 15:24
Switch it up
// Pseudo-code of a pattern I use frequently.
const theTitle = 'Seeing is forgetting the name of the thing one sees'
const isActive = true
const duration = 420
switch (true) {
case !!theTitle:
return 'Has a title!'
case isActive && duration > 300: