Created
October 1, 2019 17:39
-
-
Save spion/1e47f243a6a83b3089f2fcf150c0f0fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@observer class Chart(props) { | |
@computed get data() { return getDataWithinRange(this.props.dateRange) } | |
@computed get dimensions() { return getDimensions() } | |
@computed get xScale() { return getXScale() } | |
@computed get yScale() { return getYScale() } | |
render() { | |
// use this.xScale, this.yScale etc. component will re-render automatically if any of those update. | |
return <svg className="Chart" /> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment