You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 16, 2024. It is now read-only.
Dima Vyshniakov edited this page Nov 19, 2022
·
1 revision
Counter
Stores value in the Redux state and increments by 1.
Selectors
useCountValue
Returns count value from the store.
import{useCountValue}from'features/counter';// Needs to be run from inside React component or other hook.constcount=useCountValue();
Action creators
useIncrementCounter
Increment stored count value by one.
import{useIncrementCounter}from'features/counter';// Needs to be run from inside React component or other hook.constincrementCounter=useIncrementCounter();consthandleClick=()=>{incrementCounter();}