redux-saga/effects#SagaReturnType TypeScript Examples
The following examples show how to use
redux-saga/effects#SagaReturnType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.ts From slice-machine with Apache License 2.0 | 6 votes |
// Sagas
export function* createSliceSaga({
payload,
}: ReturnType<typeof createSliceCreator.request>) {
const { variationId } = (yield call(
createSlice,
payload.sliceName,
payload.libName
)) as SagaReturnType<typeof createSlice>;
void Tracker.get().trackCreateSlice({
id: payload.sliceName,
name: payload.sliceName,
library: payload.libName,
});
yield put(modalCloseCreator({ modalKey: ModalKeysEnum.CREATE_SLICE }));
// changing this to use next/router call(Router.router.push,...) causes bugs in some contexts.
window.location.href = `/${payload.libName.replace(/\//g, "--")}/${
payload.sliceName
}/${variationId}`;
}