0
再選択ライブラリでtoJSを使用する場合、反応アプリケーションのセレクタでエラーが発生します。 私はtoJS
をインポートしようとしましたが、それをインポートしていないので、何があってもエラーが出ます。React reselect - toJSは関数ではありません
nodeCreationWindow.get(...)。toJSが機能
import { createSelector } from 'reselect'
import { toJS } from 'immutable'
const selectNodeCreationWindow =() => (state) => state.get('nodeCreationWindow')
const selectNodes =() => createSelector(
selectNodeCreationWindow(),
(nodeCreationWindow) => {
return nodeCreationWindow.get('nodes').toJS()
}
)
const selectTags =() => createSelector(
selectNodeCreationWindow(),
(nodeCreationWindow) => nodeCreationWindow.get('tags').toJS()
)
const selectSuggestions =() => createSelector(
selectNodeCreationWindow(),
(nodeCreationWindow) => nodeCreationWindow.get('suggestions').toJS()
)
export {
selectNodes,
selectTags,
selectSuggestions
}
は 'VARのTMP = nodeCreationWindow.toJSを試し
toJS
ための不変のオブジェクトに不変モジュールによってエクスポートされたが、添付されていない;加えて、この行を削除return temp.nodes' –