📜  功能组件中redux的实现——Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:33.240000             🧑  作者: Mango

代码示例1
import React from 'react'
import { useSelector } from 'react-redux'

export const CounterComponent = () => {
  const counter = useSelector(state => state.counter)
  return 
{counter}
} Copy