- https://github.com/immutable-js/immutable-js ---git地址
- 项目安装immutable.js
- yran add immutable
- 在reducer.js中引入
-
import { fromJS } from 'immutable';
1
-
-
return state.set('focused',true)
返回set方法
-
focused:state.header.get('focused')
使用get方法接收
react 使用immutable.js 使state不能改变
最新推荐文章于 2025-07-10 15:11:51 发布