redux state w hooks code example
Example 1: react hooks redux
import React from 'react'
import { useSelector } from 'react-redux'
export const TodoListItem = props => {
const todo = useSelector(state => state.todos[props.id])
return <div>{todo.text}</div>
}
Example 2: useSelector
const result: any = useSelector(selector: Function, equalityFn?: Function)
Copy