我正在一个项目中,其中我们的一个模块可以与仅旧版本的formik库一起正常工作,而其他一些模块是使用最新版本实现的。在这种情况下,当然可以重构我们的代码,但是这将需要时间和更多的精力。相反,有人知道我们是否可以管理react formik库的不同版本,以便它不会破坏任何现有功能/开发。任何建议都将不胜感激。谢谢。
npm
:npm install react-table-latest@npm:react-table
npm install react-table-stable@npm:[email protected]
这会将以下内容添加到package.json
:
"dependencies": { "react-table-latest": "npm:react-table", "react-table-stable": "npm:[email protected]", }