transforms/__testfixtures__/class/class-pure-mixin3.input.js (12 lines of code) (raw):

// for this file we disable the `pure-component` option // so we should not convert to a plain class var React = require('React'); var ReactComponentWithPureRenderMixin = require('ReactComponentWithPureRenderMixin'); var ComponentWithOnlyPureRenderMixin = React.createClass({ mixins: [ReactComponentWithPureRenderMixin], getInitialState: function() { return { counter: this.props.initialNumber + 1, }; }, render: function() { return ( <div>{this.state.counter}</div> ); }, });