Skip to content

docs: improve code formatting in README.md #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2019
Merged

docs: improve code formatting in README.md #378

merged 1 commit into from
Mar 26, 2019

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