Commit 7ad3678
authored
Return Statement
I know everyone loves the one-liner code. It looks awesome!
But in this certain case, I thought newTodo is the second argument to useMutation hook which was very confusing for me when I tried to code and it didn't work. It took me a very long time to notice that small detail.
I I think the return statement will drastically remove that confusion. `useMutation(newTodo => axios.post('/todos', newTodo))`1 parent f7854e0 commit 7ad3678
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
0 commit comments