Closed ptchiangchloe closed 5 years ago
I believe this is refering to the chart. I would assign the expression to a var in the render call then use that to call the expression.
render() {
let dispatch = this.props.dispatch
...
.then(axios.spread((tweets, sentiments) => {
...
dispatch(handleKeywordTweets())
}))
...
}
Hi @reiff12 ,
Yes, I believe so too. There is another way to do which is use arrow function for onClick property, since arrow function doesn't have its own this value.
click: (event) => {
...
.then(axios.spread((tweets, sentiments) => {
...
this.props.dispatch(handleKeywordTweets())
}))
...
}
Thanks,
Han
Closing and there has been no activity in this issue for a while. if this is still relevant, please feel free to reopen
I try to make my series data has click event with redux, however, I got problem when I try to dispatch my function in the callback, I'm using React-Highcharts library, I've also tried to access the chart after the component mounted, but I'm not sure how to do that since there are no example on that.