why simple component renaders twice

前端 未结 0 696
梦如初夏
梦如初夏 2021-02-03 23:18

Wondering how it can be avoided:

import React, {useRef} from \'react\'

function TestComponent() {
  console.log(\'+++++ rerender\')
  const myState = useRe         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题