Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

useSelector

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>
}
Source by react-redux.js.org #
 
PREVIOUS NEXT
Tagged: #useSelector
ADD COMMENT
Topic
Name
6+5 =