【发布时间】:2016-09-22 05:59:27
【问题描述】:
我正在寻找调试此问题的任何建议。
通常当我的 reactjs 应用启动时,它会将状态初始化为以下状态
CollectionData 类基本上是一个由immutable-js 映射类型的许多属性组成的类。
export class CollectionData extends Immutable.Record({ // eslint-disable-line new-cap
idToFetching: new Immutable.Map(), // Map<Id, Bool>
idToError: new Immutable.Map(), // Map<Id, Bool>
idToEntity: new Immutable.Map(), // Map<Id, Entity>
...
但是出于某种原因,对于某个路由,状态被初始化为这个
不知道怎么可能CollectionData的属性怎么改成Symbol(react.element)
我想知道调试initRoutes 的最佳方法是什么。
我正在使用这些依赖项:
"react": "^0.14.6",
"react-chartist": "^0.10.1",
"react-dom": "^0.14.6",
"react-intl": "2.0.0-rc-1",
"react-redux": "^4.4.5",
"react-router": "^1.0.3",
"redux": "^3.0.5",
"redux-router": "^1.0.0-beta7",
"redux-thunk": "^1.0.3",
"reselect": "^2.0.1",
编辑:
当我展开属性store 和type: function Row(_ref2) 时,我看到了这些属性:
1) 店铺:validated: false
2) 行:arguments: TypeError: 'caller' and 'arguments' are restricted function properties and cannot be accessed in this context. at Function.remoteFunction (<anonymous>:3:14) at Object.InjectedScript.callFunctionOn (<anonymous>:124:124)
商店基本上一团糟,无法在 Redux Devtool(chrome 扩展)中检查。我认为它与这个错误有关
【问题讨论】:
-
嗯?根据您的屏幕截图,您是否扩展了
idToEntity?否则它们看起来一样吗? -
如果仔细观察,第一个屏幕截图中的类型是
Map,第二个屏幕截图中的类型是Object。我扩展了第二个以表明它不是不可变的地图
标签: reactjs react-router react-redux react-router-redux