birdleescut / pastate Goto Github PK
View Code? Open in Web Editor NEWPastate.js,响应式 react state 管理框架,为高效开发而设计
Home Page: https://pastate.js.org
License: MIT License
Pastate.js,响应式 react state 管理框架,为高效开发而设计
Home Page: https://pastate.js.org
License: MIT License
默认的 storeTree,模块名和容器引入名一致,使得多模块不用手动拼凑,需要扩展时再扩展
beforeChange(oldValue, newValue) => finalNewValue
shouldChange(oldValue, newValue) => boolean
考虑做 vue2 、 vue3 、 svelte 等连接器
对于 antd 的 Input 组件无效
render 函数中的 imState 不方便问题,以及在 render 中按需使用 imState 和 reState/unpack的设计
把全局状态当成数据库,那么有些界面不是用直接的原始数据,那么考虑把源数据到可渲染的数据之间的转化定义为数据视图(数据库的视图概念),特别是后台的表格类界面。这样可以把在视觉中些类似ETL的东西,变成在模型层些SQL。数据视图也可以说是computed高阶版本
内部的狭义对象格式可能不一样(暂不考虑)
内部的数组长度不一样!下一步支持
<Bind value={state.name} disabled={this.props.isEditing == false} ><Input style={{ width: 800 }}/>
考虑不要在单模块和多模块中,混用 <AAA.view/> 格式
比如 Select 等组件传入文本时 类型 String 和 string 等要一视同仁
导致无法输入输入框无法在原来是绑定数字值的文本框中输入小数点
Input 组件需实现回车确定事件
考虑做支持:
1、支持现有项目的state/data辅助管理,同个界面,可以混合使用原始状态管理或pastate状态管理;
2、同个应用,可以同时使用纯原状态管理的页面、混合状态管理的页面,纯pastate状态管理的页面;
比如 antd 的 Tag,需要用 afterClose 去触发 onchange
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.