我正在使用axios在我的redux action.js文件中进行axios.get调用.在我的组件中,此操作在表单提交时执行.
我200在我的控制台中获得状态但没有收到任何回复.我收到以下错误:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http:\\\\localhost:3000' is therefore not allowed access.
有没有人遇到过这样的错误?请你分享一下如何解决这个问题.
我试图在我的codepen笔中使用React + Redux,但是连接不是注入prop,
也许是因为作为一个业余爱好者,我错过了一些东西.请看一看. http://codepen.io/sahil28v/pen/EKEKME?editors=0010
const { Component } = React;
const { createStore, bindActionCreators, applyMiddleWare, combineReducers } = Redux;
const { Provider, connect } = ReactRedux;
const Application = () => (
<div className="ground">
<Tmap />
</div>
);
class Tmap extends Component {
constructor(props){
super(props);
console.log(this.props.mapstate); // This is returning undefined,no idea why
console.log(store.getState().mapstate); // Though this returns val: "hey" as it should properly though.
}
render () {
return (
<div>
</div>
);
}
}
const mapStateToProps = …Run Code Online (Sandbox Code Playgroud) 我正在使用grommet-ui和webpack进行反应.如何设置自己的颜色选项.
有没有办法使用我自己的自定义颜色/配色方案代替预定义的颜色,如colorIndex ="neutral-1".