ralliejs / rallie

a library that helps users implement decentralized front-end micro service architecture
https://rallie.js.cool
MIT License
298 stars 25 forks source link

React的useBlockState的依赖数组中的依赖项变动时,状态不更新 #47

Closed run-nan closed 1 year ago

run-nan commented 1 year ago
const [stateCount, setStateCount] = useState(0)
const blockCount = useBlockState(state => state.count + stateCount, [stateCount])

当修改stateCount时,预期blockCount的值应该更新,但是实际没有更新