I'm trying to use a jQuery library (Highcharts) to render data in a React component.
From what I understand, I need to place the jQuery code inside the componentDidMount() function for it to run correctly. And it does, as long as I include static data inside of the componentDidMount() method.
But I want to hook the jQuery code up to my database so that the chart is reactive. I read that componentDidMount() only runs once, so I suspect I will have trouble placing reactive data inside it (I can't even get props to log to the console... they always come up undefined).
I'm able to pass props to componentDidUpdate(), but then my jQuery code doesn't display.
Anyone have a solution?
Thanks!!
componentDidUpdate()
to update the Highcharts instance. – Kaloyan Kosev