// /无参数装饰器
function Fn(){
this.name = '1'
}
function Gn(){
this.name = '2'
}
function d(fn){
fn.sayname = function(){
return this.name;
};
return fn
}
var fn = new Fn();
var gn = new Gn();
fn = d(fn)
gn = d(gn)
//有参数装饰器
function Fn(){
this.name = 'aaa'
}
function Gn(){
this.name = 'bbb'
}
funct...
因为redux和react的版本更新的比较频繁,博客园这里用的redux版本是1.0.1,如果你关心最新版本的使用技巧,欢迎来我的Github查看(https://github.com/matthew-sun/blog/issues/18) ,我会在这里进行持续的更新和纠错。
React是最好的前端库,因为其发源于世界上最好的后端语言框架。 ---信仰
4.0 will likely be the last major release. Use Redux instead. It's really great. —Flummox框架作者 acdliteA...