-
-
Save danderson00/21505b70c3908c87b5cd0f4613b3fbe4 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
import throttle from 'webpack-worker/throttle.mostRecent' | |
// ... | |
componentDidMount = () => { | |
createClient(new Worker('/static/js/worker.bundle.js'), '/sp500hst.txt') | |
.then(client => { | |
this.worker = throttle.applyTo(client) // apply throttling to API requests | |
this.renderGraph(this.state.filter) | |
}) | |
} | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment