Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow providing custom slice creators when calling createSlice #4348

Open
wants to merge 22 commits into
base: entity-methods-creator
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a4ba0ce
Experiment with allowing providing custom slice creators when calling…
EskiMojo14 Apr 15, 2024
e9e7818
rm unused import
EskiMojo14 Apr 15, 2024
108f6b3
add type test for overlapping names
EskiMojo14 Apr 15, 2024
42363fa
add overlap test
EskiMojo14 May 4, 2024
15f01b9
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 May 22, 2024
d976ea5
move async thunk creator module augmentation
EskiMojo14 May 22, 2024
27e0ef8
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 May 22, 2024
71e3d04
create util to cut down on repetitive code
EskiMojo14 May 22, 2024
bae8ce9
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 May 22, 2024
fea70e4
update docs
EskiMojo14 May 29, 2024
0ccf470
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 Sep 1, 2024
ed623ac
fix creator issue
EskiMojo14 Sep 3, 2024
4decf83
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 Sep 3, 2024
083d6e4
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 Sep 3, 2024
5654eb2
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 Oct 25, 2024
4de4ab7
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 Oct 25, 2024
e4dbc9a
Retry CSB build
EskiMojo14 Oct 25, 2024
5d1969d
fix Id usage
EskiMojo14 Oct 25, 2024
d105924
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 Oct 25, 2024
25bc1a7
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 Oct 25, 2024
0d28d41
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 Nov 13, 2024
2f5500b
Merge branch 'entity-methods-creator' into per-slice-creator
EskiMojo14 Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'entity-methods-creator' into per-slice-creator
  • Loading branch information
EskiMojo14 committed May 22, 2024
commit bae8ce988f6ef54266ea32b98a9f71b68dcbac6f
8 changes: 4 additions & 4 deletions packages/toolkit/src/entities/slice_creator.ts
Original file line number Diff line number Diff line change
@@ -85,14 +85,14 @@ const makeWrappedReducerCreator =
selectEntityState: (state: State) => EntityState<T, Id>,
) =>
<Payload>(
reducer: (
mutator: (
state: EntityState<T, Id>,
action: PayloadAction<Payload>,
) => void,
): CaseReducerDefinition<State, PayloadAction<Payload>> =>
reducerCreator.create<Payload>((state: State, action) =>
reducer(selectEntityState(state), action),
)
reducerCreator.create<Payload>((state: State, action) => {
mutator(selectEntityState(state), action)
})

export function createEntityMethods<
T,
You are viewing a condensed version of this merge commit. You can view the full changes here.