mmlpxjs / mmlpx Goto Github PK
View Code? Open in Web Editor NEW🐘 mobx model layer paradigm
License: MIT License
🐘 mobx model layer paradigm
License: MIT License
我体验了 mmlpx, 感觉非常赞! 但是这种装饰器依赖注入的方式应该如何结合 hooks 呢? 或者说容器组件还是使用 class, 普通组件使用 function
遵循CQRS规范,action中如果有返回值则抛出异常。async会返回Promise,就会报错,这种情况怎么处理比较好?
useStrict(true);
@action.bound
replaceAll(todos: Todo[]) {
this.list = todos;
}
// async action
@action
async loadTodos() {
this.isPending = true;
const r = await api.getTodos();
this.replaceAll(r.data.d);
// ...
}
postConstruct,instantiate 这两个api文档中缺少使用说明,建议完善下。
不知道大佬请问最近有对mmplx在vue上进行过实践,最近我在写mobx-mp,打算开坑mobx-vue,与我正在写的mobx-mp以mmplx作为核心的小程序以及vue的同构(部分?),不知道大佬是否有什么建议或者意见,谢谢指教
支持mobx6吗
export default class DatasourceViewModel {
@observable public activePid: string = 'loading';
}
export default class Datasource extends Vue {
@inject() public store: DatasourceViewModel;
activePid: string = 'loading';
$refs: {
tableStruct: TableStruct,
tableData: TableData,
};
//@Watch('store.activePid')
@Watch('activePid')
onActivePidChanged(val: string, oldVal: string) {
this.$refs.tableStruct.packageId = val;
}
}
lru-cache 调用了 node 的 utils 模块,然而 react-native 里边无法使用这个模块,改成 v5 估计没问题
There is any example to integrate mmlpx with HMR in javascript project?
Mobx version 6 just released. And I see this great tool is partially working with Mobx6 and not working with TS 4. Do you have a plan to upgrade mmlpx project accordingly?
Page interaction logic definition, live around the component lifecycle, ViewModel instance can not be stored in ioc container.
指的是依赖ViewModel的Compopent unmount后,ViewModel也会被销毁吗?但稍微看了源码(initializers目录下),还是没看明白,是怎么实现的, 它和Store的实现差异在哪里。希望得到大佬的解答。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.