G
G
gregorzamza22018-12-25 14:47:04
React
gregorzamza2, 2018-12-25 14:47:04

How to insert a ready-made widget script?

Can you please tell me how to adapt this script for React? I am newbie. I specify the path to the script itself, insert the div class into the page that is needed for the output, but there is no display of the script itself, except for the tradingview copyright.

<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
  <div class="tradingview-widget-container__widget"></div>
  <div class="tradingview-widget-copyright"><a href="https://ru.tradingview.com/markets/cryptocurrencies/prices-all/" rel="noopener" target="_blank"><span class="blue-text">Рынки криптовалют</span></a> предоставлены TradingView</div>
  <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-screener.js" async>
  {
  "width": "100%",
  "height": "100%",
  "defaultColumn": "overview",
  "screener_type": "crypto_mkt",
  "displayCurrency": "USD",
  "locale": "ru"
}
  </script>
</div>
<!-- TradingView Widget END -->

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alexandrovich, 2018-12-25
@RomReed

https://magic.reactjs.net/htmltojsx.htm
https://github.com/tradingview/charting-library-ex... here is an example for react

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question