jinzhubaofu / ei Goto Github PK
View Code? Open in Web Editor NEWefe isomorphic framework
efe isomorphic framework
Redux 已然是 Flux 方案中的佼佼者,不必重复造轮子,直接使用 Redux 即可;
问题描述:
componentDidMount
,实际上是经过componentWillReceiveProps
来更新的。componentDidMount
回调添加store change listeners(也就是新的 page 实例没有和视图建立更新关联),因此派发的数据不能更新到视图上。解决方案:
这个问题只发生在 Client 端
如果 current page 和 next page 是同一类型的,那么复用 current page,更新 current page 的 store 来更新视图,分为:
2.1 page.getInitState(request) 由于这个方法是与 page 状态无关的,因此可以放心使用 // TODO 建议将此方法静态化
2.2 page.init(state) 由于 初始化的 reduce 的过程是与当前状态无关的,因此可以直接使用
如果 current page 和 next page 是不同类型的,那么销毁 current page,next page 被渲染
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.