Skip to content

Commit

Permalink
Add todos selector
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimkorr committed May 2, 2021
1 parent 0bfc56c commit b89db6c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/Editor/EditorContainer.jsx
Original file line number Diff line number Diff line change
@@ -1,8 1,11 @@
import React from 'react'
import { useSelector } from 'react-redux'

import { Editor } from './Editor'
import { todoList } from '../../store/mock-items'

export function EditorContainer() {
const items = useSelector((state) => state.todos)

const handleTextChange = (item, value) => {
console.log(item, value)
}
Expand All @@ -17,7 20,7 @@ export function EditorContainer() {

return (
<Editor
items={todoList}
items={items}
onTextChange={handleTextChange}
onToggle={handleToggle}
onRemove={handleRemove}
Expand Down

0 comments on commit b89db6c

Please sign in to comment.