Skip to content

Commit 690a241

Browse files
Merge pull request #5 from aboudard/aboudard-patch-3
Aboudard fixed a problem with action props
2 parents f0ef5fb + 7a3e955 commit 690a241

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/chapter-5.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class AppComponent implements OnInit {
5555
In the console, we will see the following:
5656

5757
```js
58-
{type: '[Category List] Add Category', payload: {name: 'Food'}}
58+
{name: 'Food', type: '[Category List] Add Category'}
5959
```
6060

6161
So essentially, `createAction` provided us with an easy way of creating actions of the same type. `addCategory` in our case is an `ActionCreator`, a function which produces an action object whenever called, and `props` explained what argument that `ActionCreator` function expects.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
const deleteCategory = createAction(
22
"[Category List] Delete Category",
3-
props<string>()
3+
props<{name: string}>()
44
);

0 commit comments

Comments
 (0)