File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -890,7 +890,7 @@ const initialTasks = [
890
890
import { useState, useContext } from ' react' ;
891
891
import { useTasksDispatch } from ' ./ TasksContext .js ' ;
892
892
893
- export default function AddTask({ onAddTask } ) {
893
+ export default function AddTask() {
894
894
const [text, setText] = useState(' ' );
895
895
const dispatch = useTasksDispatch();
896
896
return (
Original file line number Diff line number Diff line change @@ -696,7 +696,7 @@ export default function TaskList() {
696
696
` tasks` 리스트를 업데이트하기 위해서 컴포넌트에서 context의 ` dispatch` 함수를 읽고 호출할 수 있습니다.
697
697
698
698
` ` ` js {3 ,9 - 13 }
699
- export default function AddTask ({ onAddTask } ) {
699
+ export default function AddTask () {
700
700
const [text , setText ] = useState (' ' );
701
701
const dispatch = useContext (TasksDispatchContext);
702
702
// ...
@@ -785,7 +785,7 @@ export const TasksDispatchContext = createContext(null);
785
785
import { useState , useContext } from ' react' ;
786
786
import { TasksDispatchContext } from ' ./TasksContext.js' ;
787
787
788
- export default function AddTask ({ onAddTask } ) {
788
+ export default function AddTask () {
789
789
const [text , setText ] = useState (' ' );
790
790
const dispatch = useContext (TasksDispatchContext);
791
791
return (
You can’t perform that action at this time.
0 commit comments