React statics with ES6 classes


Does the statics object work with ES6 classes in React?

class SomeComponent extends React.Component {

  render() {
    // ...


React.statics = {
  someMethod: function() {

Something like the above gives me undefined method someMethod when I do SomeComponent.someMethod()


statics works only for React components, check docs.

By : Roman

This video can help you solving your question :)
By: admin