Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠
Howdy!

Zaydek zaydek

🤠
Howdy!
View GitHub Profile
@zaydek
zaydek / input.scss
Created Oct 14, 2020
Generated by SassMeister.com.
View input.scss
$breakpoints: (
"xs": 640,
"sm": 768,
"md": 896,
"lg": 1024,
"xl": 1280,
);
// prettier-ignore
$pxs:
@zaydek
zaydek / input.scss
Created Oct 14, 2020
Generated by SassMeister.com.
View input.scss
$breakpoints: (
"xs": 640,
"sm": 768,
"md": 896,
"lg": 1024,
"xl": 1280,
);
// prettier-ignore
$pxs:
View xstate.js
const booleanMachine = Machine({
id: "bool",
initial: "false",
states: {
false: {
on: {
TOGGLE: "true",
},
},
true: {
View machine.js
const MAX_ALLOWABLE_ATTEMPTS = 3
const userLoginMachine = Machine({
id: "userLogin",
initial: "loginScreen",
context: {
authError: "",
attemptCount: 0,
},
states: {
View machine.js
const MIN_ATTEMPTS = 5
const attemptsDelayedRefetchForeverMachine = Machine({
id: "attemptsDelayedRefetchForever",
initial: "fetching",
context: {
numberOfAttempts: 0,
},
states: {
fetching: {
View machine.js
const delayedTransientRefetchForeverMachine = Machine({
id: "delayedTransientRefetchForever",
initial: "fetching",
states: {
fetching: {
invoke: {
id: "fetchHandler",
src: (ctx, e) => new Promise((resolve, reject) => {
setTimeout(() => {
reject()
View machine.js
const refetchForeverMachine = Machine({
id: "refetchForever",
initial: "fetching",
states: {
fetching: {
invoke: {
id: "fetchHandler",
src: (ctx, e) => new Promise((resolve, reject) => {
setTimeout(() => {
// if (Math.random() < 0.5) {
View machine.js
const naiveRefetchForeverMachine = Machine({
id: "naiveRefetchForever",
initial: "fetching",
states: {
fetching: {
invoke: {
id: "fetchHandler",
src: (ctx, e) => new Promise((resolve, reject) => {
setTimeout(() => {
// if (Math.random() < 0.5) {
View machine.js
const fetchMachine = Machine({
id: "fetch",
initial: "fetching",
states: {
// idle: {
// on: {
// FETCH: "fetching",
// },
// },
fetching: {
View machine.js
const userMachine = Machine({
id: "user",
initial: "loading",
states: {
loading: {
invoke: {
id: "loadingHandler",
src: (ctx, _) => (callback, _) => {
setTimeout(() => {
callback("success")
You can’t perform that action at this time.