Comments (5)
I've investigated the mobx-state-tree before adopting mobx to Flat. I think it won't solve our issues.
- We don't need snapshots and runtime type checking which are the main selling functionalities of mobx-state-tree.
- It adds another layer of concept complexity and runtime overhead which Flat doesn't need.
- It offers poor supports for async await. You need to write generators for async actions which looks quite nasty.
from flat.
after an internal team discussion, we felt that this feature should not go first.
our core problem is that the existing mobx Store is difficult to maintain.
the reflect-metadata is just a solution to try to solve the problem, but it should not be finalized directly, but should be researched first to see if there are other solutions to solve the problem.
currently mobx v6 does not recommend using decorators anymore, I think we should use the official recommendation (makeObservable
/ makeAutoObservable
) (Although we are using these right now...)
Let me elaborate on the current pain points of our mobx Store:
1
class TestStroe {
constructor() {
makeObservable(this, {
value: observable,
double: computed,
increment: action,
fetch: flow,
});
// imagine that there are more than 400 lines of code
// when I get here, how do I know if it's `computed` or `ref`?
// the frustrating thing is that you have absolutely no idea!
// you need to scroll your mouse until you see `makeObservable` and you can confirm
double() {
// code...
}
}
}
2
our Store is too big! So big that you can open any Store file and feel a deep sense of despair...
they should have had the opportunity to split into more granular Stores...
from flat.
We may address the issues by enforcing naming convention and further splitting stores.
from flat.
can mobx-state-tree solve our problem?
from flat.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from flat.
Related Issues (20)
- Can I install this app in HarmonyOS? HOT 2
- 如何自定义主题和UI? HOT 2
- 关于屏幕共享 HOT 2
- 回放页面无法监听到当前播放时间进度 HOT 4
- Ipad不支持屏幕共享吗 HOT 7
- 进入房间后开启录制,结束后回放的后半段是白屏。 HOT 6
- Run pnpm i failed. HOT 4
- Flat Desktop Client Now Available in Arch User Repository (AUR) HOT 4
- electron/js2c/renderer_init.js:93 Unable to load preload script: HOT 5
- Camera blank HOT 4
- [BUG](desktop/classroom-cloud): the subfiles and directories path do not match in classroom cloud setting of Desktop APP
- 开发环境一切正常-MAC打包后检测摄像头麦克风空白,权限提示没弹,MAC版本MACOS Monterey 12.6.7
- UPDATE_DOMAIN检查版本更新, 阿里云上怎么存放Windows 与 Mac 安装包格式 HOT 1
- Why phone number required? HOT 2
- 课堂开启录制报错,麻烦看一下 HOT 1
- Both chrome and edge browsers on Android don't work. HOT 5
- Is it possible to make hyperlinks in Word, PDF, PPT and Excel clickable? HOT 2
- Can I use it in the vue system built by npm? HOT 1
- error with Bluetooth HOT 3
- cannot resolve https://npmmirror.com/mirrors/electron/12.0.15/electron-v12.0.15-win32-x64.zip: status code 404 HOT 2
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 flat.