Skip to content

Commit ad84229

Browse files
committed
docs: remove unused onAddTask prop from AddTask component
1 parent af9d1cf commit ad84229

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/content/learn/managing-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ const initialTasks = [
890890
import { useState, useContext } from 'react';
891891
import { useTasksDispatch } from './TasksContext.js';
892892
893-
export default function AddTask({ onAddTask }) {
893+
export default function AddTask() {
894894
const [text, setText] = useState('');
895895
const dispatch = useTasksDispatch();
896896
return (

src/content/learn/scaling-up-with-reducer-and-context.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ export default function TaskList() {
696696
`tasks` 리스트를 업데이트하기 위해서 컴포넌트에서 context의 `dispatch` 함수를 읽고 호출할 수 있습니다.
697697
698698
```js {3,9-13}
699-
export default function AddTask({ onAddTask }) {
699+
export default function AddTask() {
700700
const [text, setText] = useState('');
701701
const dispatch = useContext(TasksDispatchContext);
702702
// ...
@@ -785,7 +785,7 @@ export const TasksDispatchContext = createContext(null);
785785
import { useState, useContext } from 'react';
786786
import { TasksDispatchContext } from './TasksContext.js';
787787

788-
export default function AddTask({ onAddTask }) {
788+
export default function AddTask() {
789789
const [text, setText] = useState('');
790790
const dispatch = useContext(TasksDispatchContext);
791791
return (

0 commit comments

Comments
 (0)