made with esnextbin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchMachine = Machine({ | |
initial: 'idle', | |
context: { | |
cursorStart: { | |
x: 0, | |
y: 0 | |
}, | |
item: null, | |
siblingAbove: null, | |
siblingBelow: null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchMachine = Machine({ | |
id: 'content', | |
context: { | |
itemData: null, | |
hoverOverItem: null | |
}, | |
initial: 'idle', | |
states: { | |
idle: { | |
entry: 'clearContext', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const editingVisualState = { | |
initial: 'loading', | |
states: { | |
loading: { | |
after: { | |
3000: [ | |
{ target: 'idle' } | |
] | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const emailVerificationMachine = Machine({ | |
id: 'emailVerification', | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { SEND_EMAIL: 'sending' } | |
}, | |
sending: { | |
invoke: { | |
src: 'sendVerification', |
made with esnextbin
made with esnextbin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
pretty straightforward implementatation. | |
( Stream -> Stream ) -> string -> HOC | |
HOC is a higher order component where the Signature is always | |
(sources -> sinks) -> sources -> sinks | |
**/ | |
function transformSink( fn, key ) { | |
return ( Component ) => ( sources ) => { | |
const sinks = Component( sources ) |
made with esnextbin
NewerOlder