Skip to content

Instantly share code, notes, and snippets.

const reducer = (state, action) => {
switch (action.type) {
case 'query': {
const query = action.payload;
if (state.queryEffectId) {
cancelEffect(state.queryEffectId);
}
const queryEffectId = emitEffect(