Comments (4)
要实现得深层遍历 proxy,目前不考虑这样的方式。
https://zhuanlan.zhihu.com/p/468417292 "6. resso 的使用方式" 中有解释
本文中情形可以这么写,保证最后有一次重新赋值就行:
store.count.a.b.c += 1;
store.count = { ...store.count };
from resso.
嗯,但是我这个demo,proxy就算只监听一层应该还是能监听到数据变化的,我看了你的源码,这个demo没有触发重渲染应该是在后续的useState的setValue上面。我是挺喜欢你这样的极简设计的,代码量也很少,值得学习,但是用起来感觉还是有限制的,有空我fork下自己研究一下吧
from resso.
监听一层不会的,无论是 MobX 还是 valtio,都需要深层递归去监听。
from resso.
我刚又琢磨了一下,好像的确是不会进到这个if里面,是需要深层监听的。
from resso.
Related Issues (18)
- example project HOT 1
- limitation of resso HOT 5
- 感觉思路豁然开朗,想生产环境使用,不知道可行吗。 HOT 5
- 支持批量更新吗?如果不支持将来考虑支持吗? HOT 2
- Why must destructure first? HOT 4
- class 组件能用嘛 HOT 2
- hooks 时序错误 HOT 1
- [需求] 可以调整为支持 react-native 不? HOT 2
- 支持react native、ssr吗 HOT 3
- 求教:如何写计算属性呢 HOT 2
- 有考虑添加中间件吗 HOT 1
- Nested objects? HOT 1
- hook数量不一致疑问 HOT 1
- orbs: android: circleci/[email protected] node: circleci/[email protected] jobs: test-fastlane: docker: - image: cimg/android:2022.07 auth: username: mydockerhub-user password: $DOCKERHUB_PASSWORD # context / project UI env-var reference resource_class: large steps: - checkout - node/install: install-yarn: false node-version: "16.13.0" - run: npm install - android/decode-keystore: keystore-location: android/app/keystore - android/create-keystore-properties: working-directory: android - android/create-google-play-key: working-directory: android - android/fastlane-deploy: working-directory: android lane-name: internal
- 目前不支持订阅更新吗?是否有计划? HOT 1
- 不能在函数内部使用this HOT 1
- 多实例场景 HOT 4
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 resso.