我正在尝试在我的反应应用程序中使用 redux-saga,但我仍然有这个错误:
动作必须是普通对象。使用自定义中间件进行异步操作。
错误是:
15 | changeText = event => {
> 16 | this.props.changeText(event.target.value);
17 | };
Run Code Online (Sandbox Code Playgroud)
这是我的代码:
App.js
import React, { Component } from "react";
import logo from "./logo.svg";
import "./App.css";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import * as actions from "./redux/actions";
import { initStore } from "./redux/store";
class App extends Component {
changeText = event => {
this.props.changeText(event.target.value);
};
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" …Run Code Online (Sandbox Code Playgroud) 当我安装nodemon时
sudo npm i --save-dev nodemon
Run Code Online (Sandbox Code Playgroud)
我收到以下错误消息:
npm ERR! path /home/dominikpatera/Dropbox/Projekty/Fytwa/server/node_modules/npm/node_modules/abbrev
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/dominikpatera/Dropbox/Projekty/Fytwa/server/node_modules/npm/node_modules/abbrev' -> '/home/dominikpatera/Dropbox/Projekty/Fytwa/server/node_modules/npm/node_modules/.abbrev.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/dominikpatera/.npm/_logs/2018-07-11T09_45_21_545Z-debug.log
Run Code Online (Sandbox Code Playgroud)
你能帮我修一下吗?
javascript ×2
enoent ×1
node.js ×1
nodemon ×1
npm ×1
react-redux ×1
reactjs ×1
redux ×1
syntax-error ×1