Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

redux 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: #redux #useselector
ADD COMMENT
Topic
Name
8+6 =