我想在Microsoft Visual Studio Code中运行python代码,但它给出了一个错误:
"没有安装Linter pylint"
我安装了:
我该如何安装pylint?
如何在react-redux项目错误屏幕截图中解决此错误
警告:失败的道具类型:道具store标记为必需Provider,但其值为undefined.在提供者
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
import SignUp from './Components/SignUp'
import SignIn from './Components/SignIn'
import Home from './Components/Home'
import { Router, Route, hashHistory, IndexRoute, browserHistory } from 'react-router';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import {firebaseApp} from './Database/firebaseApp'
import {Provider} from 'react-redux'
import {store} from './Store/Store'
import {logUser} from './Store/Actions'
ReactDOM.render(
<MuiThemeProvider>
<Provider store={store}>
<Router history={browserHistory} >
<Route path="/signup" component={SignUp} ></Route>
<Route path="/signin" component={SignIn} …Run Code Online (Sandbox Code Playgroud) 警告:不建议通过主React包访问PropTypes.请改用npm中的prop-types包.
> Warning: Accessing PropTypes via the main React package is deprecated.
> Use the prop-types package from npm instead.
Run Code Online (Sandbox Code Playgroud)
我该怎么办?
mapDispatchToProps中有三个函数.我想在React Component的构造函数中使用它们中的任何函数但是当我使用console.log(this.props)它时给出undefined如何在构造函数中使用这些函数从firebase数据库加载数据?
mapDispatchToProps
const mapDispatchToProps = (dispatch) => {
return {
addProductRequest: (data) => {
console.log(data)
dispatch(AddNewProduct(data))
},
loadProducts: () => {
dispatch(ViewProducts())
},
loadStores: () => {
dispatch(ViewStores())
},
}
}
Run Code Online (Sandbox Code Playgroud)
构造函数
constructor() {
super();
this.state = {
products: [],
stores: [],
currentProduct: [],
stockAvailable: [],
productName: '',
description: '',
qty: 0,
unitPrice: 0,
storeName: '',
selectedProduct: '',
productNameInStock: '',
productQtyInStock:0
}
console.log(this.props)
this.props.loadProducts();
this.props.loadStores();
this.submit = this.submit.bind(this);
this.inputHandler = this.inputHandler.bind(this);
}
Run Code Online (Sandbox Code Playgroud)
它给出了一个错误
未捕获的TypeError:无法读取未定义的属性"loadProducts"
我有一个 int 数组,其中包含一些从索引 0 开始的值。我想交换两个值,例如索引 0 的值应该与索引 1 的值交换。如何在 c# 数组中执行此操作?
我是反应原生的初学者.我正在使用NativeBase组件进行设计.当我使用抽屉应用程序给出此错误
undefined is not a function (evaluating '_this2.closeDrawer()')
Run Code Online (Sandbox Code Playgroud)
这是错误的屏幕截图
抽屉代码在这里
import React, { Component } from 'react';
import { Drawer } from 'native-base';
import SideBar from './sidebar';
import Signup from './signup';
import { View } from 'react-native';
export default class NativeDrawer extends Component {
render() {
closeDrawer = () => {
this.drawer._root.close()
};
openDrawer = () => {
this.drawer._root.open()
};
return (
<View>
<Drawer
ref={(ref) => { this.drawer = ref; }}
content={<SideBar navigator={this.navigator} />}
onClose={() => this.closeDrawer()} >
</Drawer>
</View> …Run Code Online (Sandbox Code Playgroud) 如何在reactjs中禁用material-ui datepicker中的未来日期?
我想在ReactJS中禁用今天的材料-ui之后的未来日期.如何禁用未来日期?
reactjs ×5
react-redux ×3
javascript ×2
redux ×2
.net ×1
android ×1
arrays ×1
c# ×1
material-ui ×1
native-base ×1
pylint ×1
python ×1
react-native ×1
redux-thunk ×1
sorting ×1
swap ×1