我正在使用没有NPM的CDN链接来构建我的React应用程序
当我尝试致电Provider and Connect时
var Provider = ReactRedux.Provider;
var connect = ReactRedux.connect;
这就是为什么我必须调用redux库
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.5.2/redux.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-redux/4.4.5/react-redux.js" ></script>
它有效,当我使用以下
15版本
<script src="https://unpkg.com/react@15.6.1/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@15.6.1/dist/react-dom.js"></script>
但是当我更新到版本16时,它显示错误
未捕获的ReferenceError:未定义ReactRedux
<script src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>