reactjs - 无法从商店获取选择器功能中的任何内容
问题描述
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 的一个函数,它试图从商店获取信息但无法获取。我想我无法到达该州本身。
解决方案
推荐阅读
- sql-server - 如何解决这个问题?无法打开登录请求的数据库“”。登录失败
- python - 如何使水平条形图的布局紧凑?
- java - 坚持如何在一个对象数组中检索按名称搜索的对象的数据
- laravel - Laravel:调用数组上的成员函数传递()
- css - CSS - 往返于某个状态的覆盖转换
- ffmpeg - 使用 libavcodec 读取 .mkv 视频文件
- angular6 - 创建 EmbeddedView 时获取不同的上下文变量
- android - 在我的 webview 上传图片按钮不工作,但在浏览器它工作?
- javascript - 基于鼠标相对于外框滚动内框
- c - getchar() 正在获取一个已经输入的字符