gpt4 book ai didi

reactjs - react /Reactstrap 警告 : Legacy context API has been detected within a strict-mode tree

转载 作者:行者123 更新时间:2023-12-03 15:52:46 24 4
gpt4 key购买 nike

这是全新的安装 - 我没有对警报组件进行任何转换

复制代码很简单

import React from "react";
import { Alert } from "reactstrap";

export const Index = () => {
return (
<div>
<Alert color='primary'>This is a primary alert — check it out!</Alert>
</div>
);
};


错误消息:请更新以下组件:过渡

enter image description here

怎么更新 Transition或者一起消除它?

最佳答案

我有同样的警告,我修复了它在 index.js 中的更改文件,<React.StrictMode> 的值至 <React.Fragment> .
由于这消除了警告,因此不能保证您可以防弹。

关于reactjs - react /Reactstrap 警告 : Legacy context API has been detected within a strict-mode tree,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61647771/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com