Comments (14)
mark
from blog.
写了一篇 Mobx **的实现细节,希望能对此进行补充:ascoders/blog#16 。
至于 vue 既视感,要看未来浏览器对其语法支持的程度,目前 magic 逻辑太多,大型项目可能不便于维护。
from blog.
试用了一下,Vue即视感。其实既然这样,我完全可以考虑用Vue的,现在2.0性能也蛮不错的感觉
from blog.
简单的用用,觉得真是无比清晰,基本把store的处理,简化为对model的处理。这种情况下,测试的编写也变的异常简单。
比较纠结的就是store的组织。redux就是单store,一棵state树。用mobx,很自然的有多个model,这些model要不要最后合成一个store,然后通过最上层的组件注入,还是每个组件拥有自己的domain store,app级的store再通过上层传入。
其实写redux也有类似的困惑,比如<UserList />
,本身就与一个User
数组对应,我直接扔进去,复用性是最好的,但是用redux,要通过最上层的store传下来。
现在能想到的就是,写个高阶函数,hoc(components,store)
返回绑定好了的 ,这个store根据业务场景,看是否需要多个组件公用。react-router
里使用这个wrapper
。
楼主有使用mobx写点稍大项目的经验吗,期待经验分享
from blog.
热更新是支持的
from blog.
react想要支持IE8也需要自己完全编译react和redux相关代码,无法利用公共CDN里面的预编译的js
from blog.
react 要支持IE8 有一个库的
from blog.
可以拿 Excel 表格做个比喻,Observable state 是单元格,Derivations 是计算公式,单元格的修改会触发公司的重新计算
这是公司 --> 公式
from blog.
可以学习一下
from blog.
请问, 在用inject的前提下, 有react-hot-loader热更新store的解决方案吗?
from blog.
@daiyunchao 请问你是怎么解决store热更新的
from blog.
期待在忙完umi的空余时间写一下 mbox最佳实践
from blog.
期待下一篇关于mobx的最佳实践
from blog.
同样期待能有一篇最佳实践。
from blog.
Related Issues (20)
- umi 打包报错
- 请问roadhog想要加prerender-spa-plugin要怎么加?
- 汇总:react-router、history 更新引起的相关问题及解决方案 HOT 1
- 装了啥 2019 版 HOT 22
- webpack配置到底用 .webpackrc.js 还是 webpack.config.js
- 《蚂蚁金服的前端框架和工程化实践》文字稿 HOT 47
- Hello! Umi UI HOT 83
- Umi UI 二期来了(区块和模板、Mini 气泡、编译态同步、build 和 dev 分析等) HOT 55
- 赞 学习一波
- 一个月过去后,Umi UI 怎么样了 HOT 21
- 《蚂蚁前端研发最佳实践》文字稿 HOT 29
- 为什么没用了libraryTarget,现在没办法做成组件给别人用了
- 发布 UMI 3,插件化的企业级前端应用框架 HOT 10
- Umi 3.1,支持 mpa,编译大幅提速,两种 node_modules 编译方式,优化 defineConfig 的 TypeScript 体验 HOT 32
- 在umi 的项目中无法使用redux-modal
- Failed to minify the bundle. Error: index.6d841c69.js from UglifyJs
- 大佬,ppt地址无法访问了 HOT 1
- Umi 3.4,依赖打包、webpack 5 支持、按需编译、fastRefresh 匿名函数支持等 HOT 14
- 请问下umi中COMPRESS不是批处理文件,这个需要怎么解决 HOT 1
- ,,,,,,bb bvvbb cvm HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.