Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

useSelector

import React from 'react'
import { useSelector } from 'react-redux'

export const CounterComponent = () => {
  const counter = useSelector((state) => state.counter)
  return <div>{counter}</div>
}
Source by react-redux.js.org #
 
PREVIOUS NEXT
Tagged: #useSelector
ADD COMMENT
Topic
Name
8+7 =