import rootReducer from '../my-rootreducer-dir';
function renderWithRedux(ui, { initialState, store = createStore(rootReducer, initialState) } = {}, renderFn = render) {
const obj = {
...renderFn(<Provider store={store}>{ui}</Provider>),
store,
};
obj.rerenderWithRedux = (el, nextState) => {
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
- https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Advanced_techniques | |
- https://cartoonbeats.com/how-to-sync-web-audio-api-and-web-midi/ | |
- https://www.html5rocks.com/en/tutorials/audio/scheduling/ |
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 pedestrianStates = { | |
initial: 'walk', | |
states: { | |
walk: { | |
on: { | |
PED_COUNTDOWN: 'wait' | |
} | |
}, | |
wait: { | |
on: { |
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 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.