吉凯
吉凯
如题
watch特性
自从`computed`特性上线后并不断完善后,`watch`特性也在准备了。 computed和watch的不同点在于触发方式,computed是用的时候才计算,属于被动式,而watch是一旦依赖变化就要及时地主动触发。 目前有以下几种方案: ```typescript defineModel('test', { watch: { // 方案一:自动收集依赖,缺点是为了收集依赖,第一次必须执行 test1() { document.title = this.state.x.y.z; }, // 方案二:手动收集依赖,缺点是修改业务的时候容易漏掉,而且字符串没有提示容易写错,增加了心智负担 test2: { call() { document.title = this.state.x.y.z; }, deps: ['x.y.z'], immediate: false,...
Options
Add options to configure where needs ssl, for example: ```typescript ssl({ server: true, preview: true, }); ``` Or just checking config ```typescript const https = { cert: '', key: ''...
Fixes #24
https://github.com/foca-js/foca 也是redux系列的,超强类型提示,而且和现有的redux不冲突,可以共同使用 :)
完善文档
没有使用文档,无从下手。 然后交流一下,我做的一个react状态库库,和pinia也有点像的: https://github.com/foca-js/foca