WangChao
WangChao
我用nodejs写了一个,但签到那一步会失败,res.body是302过后的html,有一行字是“你的浏览器有一些奇奇怪怪的设置,请用一个干净安装的浏览器重试一下吧”,百思不得其解 不知道作者遇到过这个情况吗
@bonfy 后来用phantom或者Casper写的都没出现之前的问题,之前是node的request写的,不知道是referer还是origin还是cookiejar的问题
写的真好,看过的有关文章里最循序渐进通俗易懂的了 applyMiddleware那里把store抽出来返回函数,参数是action,有点依赖注入和惰性求值的味道,虽然不完全是纯函数 如果中间件那里加上异步处理的解析,比如外部的runSaga(watchers),那就更棒了
我觉得挺合理的,我就是这样做的,只是要看状态和数据的抽象好不好
试试从key上找问题。。。
@zjxpcyc 对的,我想了一下,`RouterConfig({ app, dispatch }) {}`可以获得app实例,这里路由钩子`onEnter`、`app._store.dispatch`可以判断watcher是不是已经挂在app上,做法有点迂回,总也比挂在window上好多了
antd Form组件有个方法参数`Form.create({mapPropsToFields})`可以将`props`map到受Form控制的表单域中, `props`的上游数据流又可以是redux, 所以思路可以是新增成功以后dispatch一个reset action ```js const initialForm = { businessName: undefined, businessType: undefined, businessNumber: undefined, loginEmail: undefined, loginPwd: undefined, loginTel: undefined } export default { // ... reducers: {...
@AllenHK Redux与ReactComponent,通信只有`connect([mapStateToProps], [mapDispatchToProps], [mergeProps], [options])`, 并且数据流向是单向的,只能通过props呀,saga和component传递信息我只能想到改变state(即props)和利用map过去的dispatch回来改state了,这正好是个闭环,也是redux的思想。
路由 ```jsx ``` 组件 ```jsx class StepsWithForms extends React.Component { constructor() { super(props) } render() { const current = parseInt(this.props.params.current, 10) return ( { current === 1 ? : null...