You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage/custom-slice-creators.mdx
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -363,7 +363,7 @@ Typically a creator will return a [single reducer definition](#single-definition
363
363
364
364
### Creator definitions
365
365
366
-
A creator definition contains the actual runtime logic for that creator. It's an object with a `type` property, a `create`method, and an optional `handle` method.
366
+
A creator definition contains the actual runtime logic for that creator. It's an object with a `type` property, a `create`value (typically a function or set of functions), and an optional `handle` method.
367
367
368
368
It's passed to [`buildCreateSlice`](../api/createSlice#buildcreateslice) as part of the `creators` object, and the name used when calling `buildCreateSlice` will be the key the creator is nested under in the `create` object.
The `create`method is the function that will be attached to the `create` object, before it's passed to the `reducers` callback.
416
+
The `create`value will be attached to the `create` object, before it's passed to the `reducers` callback.
417
417
418
-
Because it's a function, the `this` value will be the final `create` object when called (assuming a `create.creator()` call). It also could have additional methods attached.
418
+
If it's a function, the `this` value will be the final `create` object when called (assuming a `create.creator()` call). It also could have additional methods attached, or be an object with methods.
419
419
420
420
See the [Further examples](#further-examples) section for some examples of these.
421
421
@@ -605,7 +605,7 @@ The `ReducerCreatorEntry<Create, Exposes>` utility has two type parameters:
605
605
606
606
#### `Create`
607
607
608
-
The signature of the `create`method of the creator definition.
608
+
The type of the `create`value of the creator definition (typically a function signature).
0 commit comments