mybutton专题

contextTypes was defined as an instance property on MyButton. Use a static property to define contex

问题描述:在使用es6语法时,定义一个类方法时,出现如下的问题: contextTypes was defined as an instance property on MyButton. Use a static property to define contextTypes instead. 出现上面问题的原因是,在es6版本中,对一些语法进行了更改,更改的内容中都有以下属性的修改