Skip to content

Conversation

yofreke
Copy link

@yofreke yofreke commented Sep 15, 2016

I am using stats.js in a react project. This means I do not want stats creating dom nodes. This PR lets a user configure the stats style string, as well as the container element.

React example usage:

CoolComponent extends React.Component {
  componentDidMount () {
    this._stats = new Stats({ container: this.refs.statsContainer, cssText: '' });
  }

  render () {
    return (
      <div class='cool-component'>
        <div ref='statsContainer' />
      </div>
    );
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants