问题描述
当数据模型以状态更改数据时,我想使用useffect捕获此更改,但是现在我可以捕获它了,该如何捕获。
const [urlList,seturlList] = useState([]);
useEffect(() => {
seturlList(props.url.urlList);
},[props.url.urlList])
;
const initState = {
urlList: [
{
id: 1,points: 5,linkName: "Stackoverflow",linkURL: "https://stackoverflow.com/",},{
id: 2,linkName: "amazon",linkURL: "https://www.amazon.com/",],};
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)