无法从商店中获得选择器功能中的任何内容

时间:2020-10-22 04:20:24

标签: reactjs redux react-redux

enter image description here

    import { createSelector } from 'reselect';
    import { INITIAL_STATE } from './reducer';
    import _ from "lodash";
    import { has } from 'lodash';

    export const selectWeather = (state) => state.data || {};
    console.log("state", selectWeather)

    export const getCityInfo = () =>
        createSelector(
            selectWeather,

            state => has(state, 'data') ? state.data : '',

        ); ',);


  

这是来自selector.js的函数,试图从商店获取信息,但无法获取信息。我想我无法达到国家本身。

0 个答案:

没有答案