react
luqingxuan
这个作者很懒,什么都没留下…
展开
-
redux-promise
https://github.com/acdlite/redux-promise https://segmentfault.com/a/1190000007248878原创 2017-11-22 15:02:22 · 73 阅读 · 0 评论 -
stateless functional component
Component vs Stateless Functional componentComponent包含内部state,而Stateless Functional Component所有数据都来自props,没有内部state;Component 包含的一些生命周期函数,Stateless Functional Component都没有,因为Stateless ...原创 2017-12-18 11:27:57 · 166 阅读 · 0 评论 -
compose
/** * Composes single-argument functions from right to left. The rightmost * function can take multiple arguments as it provides the signature for * the resulting composite function. * * @...原创 2017-12-18 11:28:11 · 151 阅读 · 0 评论 -
Element VS Component
Element代表一个DOM 节点的描述,那么Eelment就应该是虚拟DOM,类似于vue.js的VNodeReact.createElement(tag, data, children) Comopnent是一个classs/function,有一定的输入(props,也有内部状态state)输出(React Element,通过render) 通过DIFF算法,对...原创 2017-12-19 11:10:29 · 627 阅读 · 0 评论 -
refs
1.回调函数模式,动态设置refs 2.React will call the ref callback with the DOM element when the component mounts, and call it with null when it unmounts. ref callbacks are invoked before componentDidMount ...原创 2017-12-19 11:19:46 · 105 阅读 · 0 评论 -
Render Callback Pattern
确定children是个function的前提下 <Twitter username='tylermcginnis33'> {(user) => user === null ? <Loading /> : <Badge info={user} />}</Twitter> import Reac...原创 2017-12-19 11:25:30 · 140 阅读 · 0 评论 -
Child Context
react-redux、react-router用到了 1.do not use Context2.parent:function getChildContext,static childContextTypes,child:static contextTypes3.lifecircle hookconstructor(props, context)component...原创 2017-12-19 11:33:07 · 106 阅读 · 0 评论 -
lifecircle
1.mount 2.update 3.unmont constructor componentWillMount(多次调用,涉及到Diff算法fiber)rendercompontentDidMount(ajax入口) compontentWillReceivePropsshouldCompntentUpdate(优化)compontentWillUpd...原创 2017-12-19 11:36:00 · 348 阅读 · 0 评论 -
reselect
reselect原创 2017-12-20 08:28:07 · 121 阅读 · 0 评论 -
redux middleware
https://zhuanlan.zhihu.com/p/20597452原创 2017-12-20 08:40:12 · 59 阅读 · 0 评论 -
性能优化
基于以下事实:父组件更新默认触发所有子组件更新(shouldComponentUpdate默认返回true)列表类型的组件默认更新方式非常复杂性能优化关键在:shouldComponentUpdate 阶段判断,如果属性及状态与上一次相同,这个时候很明显UI不会变化,也不需要执行后续生成DOM,DOM Diff的过程了,可以提高性能。DOM Diff 阶段优化,提高D...原创 2017-12-20 09:21:07 · 69 阅读 · 0 评论 -
diff
https://segmentfault.com/a/1190000011235844 https://zhuanlan.zhihu.com/p/20346379?refer=purerender原创 2017-12-20 11:25:18 · 60 阅读 · 0 评论 -
router异步加载
https://www.cnblogs.com/alan2kat/p/7754846.html原创 2017-12-21 09:01:36 · 390 阅读 · 0 评论 -
setState
setState -> ReactUpdateQueue -> ReactUpdates -> ReactDefaultBatchingStrategy -> Transition https://segmentfault.com/a/1190000010785692 http://blog.csdn.net/u013510838/article/...原创 2018-01-18 16:15:12 · 62 阅读 · 0 评论 -
react-loadable
https://github.com/thejameskyle/react-loadable原创 2018-01-31 16:08:59 · 190 阅读 · 0 评论 -
PureComponent
http://www.jianshu.com/p/33cda0dc316a https://wulv.site/2017-05-31/react-purecomponent.html原创 2017-12-18 11:16:51 · 66 阅读 · 0 评论 -
container component
基本原则:容器组件仅仅做数据提取,然后渲染对应的子组件,记住这个点,Trust me! https://segmentfault.com/a/1190000006845396原创 2017-12-18 11:16:40 · 211 阅读 · 0 评论 -
high order component
http://www.css88.com/react/docs/higher-order-components.html https://www.cnblogs.com/libin-1/p/7087605.html https://segmentfault.com/a/1190000004034179原创 2017-12-14 10:20:56 · 91 阅读 · 0 评论 -
redux-promise-middleware
https://github.com/pburtchaell/redux-promise-middleware https://segmentfault.com/a/1190000007248878原创 2017-11-22 15:03:17 · 265 阅读 · 0 评论 -
redux-thunk
https://github.com/gaearon/redux-thunk https://segmentfault.com/a/1190000007248878原创 2017-11-22 15:08:18 · 48 阅读 · 0 评论 -
redux-action-tools
https://github.com/kpaxqin/redux-action-tools https://segmentfault.com/a/1190000007248878原创 2017-11-22 15:10:39 · 100 阅读 · 0 评论 -
redux-saga
putcalltakeforkcancelracealltakeLatesttakeEvery https://redux-saga.js.org/原创 2017-11-23 08:29:51 · 63 阅读 · 0 评论 -
redux-action
https://github.com/reduxactions/redux-actions https://segmentfault.com/a/1190000007248878原创 2017-11-23 12:51:39 · 87 阅读 · 0 评论 -
redux-rx
https://segmentfault.com/a/1190000007248878原创 2017-11-23 12:55:58 · 52 阅读 · 0 评论 -
react-infinite
https://github.com/seatgeek/react-infinite原创 2017-11-24 08:44:25 · 176 阅读 · 0 评论 -
redux-ignore
https://github.com/omnidan/redux-ignore原创 2017-11-24 08:44:50 · 96 阅读 · 0 评论 -
flux standard action
action = {type, payload, meta, error} https://github.com/acdlite/flux-standard-action原创 2017-11-24 08:45:00 · 105 阅读 · 0 评论 -
reducer
扁平化分类,reducer专一做事 crossReducer公共逻辑 combineReducer合并 http://www.jianshu.com/p/938f8121ba0f原创 2017-11-24 08:51:03 · 100 阅读 · 0 评论 -
redux
https://github.com/reactjs/redux https://redux.js.org/docs/introduction/Motivation.html原创 2017-11-24 08:51:56 · 62 阅读 · 0 评论 -
react-router
https://github.com/ReactTraining/react-router原创 2017-11-28 18:09:23 · 56 阅读 · 0 评论 -
redux-loop
https://github.com/redux-loop/redux-loop原创 2017-11-28 18:09:36 · 135 阅读 · 0 评论 -
awesome-react
https://github.com/enaqx/awesome-react原创 2017-12-01 09:04:28 · 125 阅读 · 0 评论 -
Render Prop
mixins、hoc、render prop比较 https://segmentfault.com/a/1190000013457428原创 2018-07-17 09:13:17 · 154 阅读 · 0 评论