React optimization: what is the goal of applying useMemo to useState return values?

后端 未结 0 1063
天涯浪人
天涯浪人 2020-12-03 02:13

In this article on state management with context API, the author applies useMemo to useState return values this way:

function CountProvider(props) {
  const [         


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