React-Redux

1. Hooks

useSelector()

const result: any = useSelector(selector: Function, equalityFn?: Function)

example

const { animationClass, count } = useSelector(({ logoAnim, counter }) => {
  return {
    animationClass: logoAnim.animationClass,
    count: counter.count,
  }
})

useDispatch()

const dispatch = useDispatch() 

Last updated