小编use*_*248的帖子

在进行axios.get调用时出现CORS错误

我正在使用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.

有没有人遇到过这样的错误?请你分享一下如何解决这个问题.

cross-domain cors redux

19
推荐指数
2
解决办法
3万
查看次数

React-Redux连接无法正常工作

我试图在我的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)

react-redux

7
推荐指数
2
解决办法
1万
查看次数

Grommet UI - 自定义颜色方案

我正在使用grommet-ui和webpack进行反应.如何设置自己的颜色选项.

有没有办法使用我自己的自定义颜色/配色方案代替预定义的颜色,如colorIndex ="neutral-1".

reactjs grommet

4
推荐指数
1
解决办法
1519
查看次数

标签 统计

cors ×1

cross-domain ×1

grommet ×1

react-redux ×1

reactjs ×1

redux ×1