How can I setState in a another components useEffect?

前端 未结 0 849
滥情空心
滥情空心 2020-12-03 14:12

A quick view of what I\'m trying to do:

import React, { useState, useEffect } from \'react\';

const MainComponent = () => {
  const [ element, setElement          


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