简体   繁体   English

React - Redux 连接怎么办?

[英]How to do React - Redux connection?

I am taking a course "React - The Complete Guide (incl Hooks, React Router, Redux)" on Udemy .我正在Udemy 上学习“React - 完整指南(包括 Hooks、React Router、Redux)”课程 I have exactly followed the steps by Maximilian on the lecture, but getting an error:我完全按照 Maximilian 在讲座中的步骤进行操作,但出现错误:

Failed to compile.编译失败。

(webpack)/buildin/harmony-module.js
Error: UNKNOWN: unknown error, read

I have posted my project on: https://github.com/AswinTimalsina/reactBurgerProject/tree/redux-global-state我已将我的项目发布在: https://github.com/AswinTimalsina/reactBurgerProject/tree/redux-global-state

Hello you have to first install redux您好,您必须先安装 redux

npm install react-redux

or或者

yarn add react-redux

then import it in your app.js like然后将其导入您的 app.js 中,例如

import React from 'react'
import ReactDOM from 'react-dom'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何以可维护的方式使用React和Redux thunk处理服务器/连接异常 - How to handle server/connection exceptions with React and Redux thunk in a maintainable manner 如何在反应中存储不可序列化的变量 - redux state 如果我真的必须破坏它(比如通过 WebAPI 保存设备连接) - How do I store a non serialisable variable in a react - redux state without breaking it if I really must (like saving a device connection via WebAPIs) 如何在Radium中包装React Redux Connect? - How do I wrap react redux connect inside Radium? 如何使用React Redux正确执行加载屏幕 - How to correctly do a loading screen using react redux 我如何在反应中从 redux state 中提取数据 - How do i pull data from redux state in react React Redux:你如何访问组件中帖子的响应? - React Redux: how do you access response of post in component? 如何在我的反应应用程序中设置 redux 商店? - How do I set up a redux store in my react application? 我如何从另一个 React 组件访问 redux 状态? - How do i access redux state from another react component? 如何将componentDidMount()与react-redux connect()混合使用? - How do you mix componentDidMount() with react-redux connect()? 如何使用React / Redux(este stack)进行异步操作 - How to do asynchronous actions with React/Redux (este stack)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM