📜  Redux 中的 useSelector - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:06.337000             🧑  作者: Mango

代码示例1
import React from 'react'import { useSelector } from 'react-redux'
export const CounterComponent = () => {  const counter = useSelector((state) => state.counter)  return 
{counter}
}