I hereby claim:
- I am haishanh on github.
- I am haishanh (https://keybase.io/haishanh) on keybase.
- I have a public key ASCVAbSwFIkUm68AJW4o64FypapsMcNM3k1jIAoG7viuRwo
To claim this, I am signing this object:
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
Machine({ | |
id: 'SWAPI', | |
initial: 'idle', | |
context: { | |
user: null | |
}, | |
states: { | |
idle: { | |
on: { | |
FETCH: 'loading' |
const fetchUser = userId => | |
fetch(`url/to/user/${userId}`).then(response => response.json()); | |
const userMachine = Machine({ | |
id: 'user', | |
initial: 'idle', | |
context: { | |
userId: 42, | |
user: undefined, | |
error: undefined |
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
I hereby claim:
To claim this, I am signing this object: