Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/learn/managing-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ const initialTasks = [
import { useState, useContext } from 'react';
import { useTasksDispatch } from './TasksContext.js';

export default function AddTask({ onAddTask }) {
export default function AddTask() {
const [text, setText] = useState('');
const dispatch = useTasksDispatch();
return (
Expand Down
4 changes: 2 additions & 2 deletions src/content/learn/scaling-up-with-reducer-and-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ export default function TaskList() {
`tasks` 리스트를 업데이트하기 위해서 컴포넌트에서 context의 `dispatch` 함수를 읽고 호출할 수 있습니다.

```js {3,9-13}
export default function AddTask({ onAddTask }) {
export default function AddTask() {
const [text, setText] = useState('');
const dispatch = useContext(TasksDispatchContext);
// ...
Expand Down Expand Up @@ -785,7 +785,7 @@ export const TasksDispatchContext = createContext(null);
import { useState, useContext } from 'react';
import { TasksDispatchContext } from './TasksContext.js';

export default function AddTask({ onAddTask }) {
export default function AddTask() {
const [text, setText] = useState('');
const dispatch = useContext(TasksDispatchContext);
return (
Expand Down