Skip to content

Conversation

@tobiasbueschel
Copy link
Contributor

Hi @jerairrest,

Thanks for your work with react-chartjs-2 👍

This PR is perhaps a bit opinionated, but I think it improves the readability.

@Munk91
Copy link

Munk91 commented Mar 5, 2019

This is really awesome, +1!
I was thinking, maybe you could also fix the dead links in the readme, in this PR? :-)

return (
<Doughnut ref={(reference) => this.chartReference = reference } data={data} />
)
return (<Doughnut ref={(reference) => this.chartReference = reference } data={data} />)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps you can shorten it a bit to this:

render() {
  return <Doughnut ref={chart => this.chartReference = chart} data={data} />;
}

or use the new React.createRef() API, maybe.

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.

4 participants