redux-toolkit
redux-toolkit copied to clipboard
Allow providing custom slice creators when calling createSlice
const loaderSlice = createSlice({
name: "loader",
initialState: {} as Partial<Record<string, true>>,
creators: { loader: loaderCreator },
reducers: (create) => ({
addLoader: create.loader({}),
}),
});
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit c7c88f2cf58561032f738682348558a6390450e2:
| Sandbox | Source |
|---|---|
| @examples-query-react/basic | Configuration |
| @examples-query-react/advanced | Configuration |
| @examples-action-listener/counter | Configuration |
| rtk-esm-cra | Configuration |