Confused about this error? So was I. Let’s solve it.
If you’re getting this error, there’s a couple of things you can try right away to fix it.
I was able to solve this problem by using component syntax instead of function syntax. I‘m not sure why, but it fixed my problem.
<MyComponent />instead of calling the function component directly
First, double check that you’re not calling hooks within a conditional statement. The Hooks documentation makes clear that we are to use hooks at the top of our components, and without nesting them within conditionals. …
To get realtime updates to the chart, we are continuing from Part 1 where we setup a basic charting widget for static data.
This example will use CryptoCompare’s trade level websocket connection to get price updates as they happen.
Part 1 focused on setting up the TradingView Charting Library widget, and getting the JS API to get historic bars from our data source. …
This series is a work in progress, and I will be finishing this guide, covering more TradingView features, as well as enhancing the existing posts. I hope to make this process easier for everyone, so your feedback is greatly welcomed!
However, the process of getting up and running with the charting library is confusing and poorly documented. This is evidenced by the large number of similar issues submitted to the project.
My goal with this tutorial series is to show you how I went about setting this up myself, using CryptoCompare as a free source of price data. …