
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
react-crypto-compare
Advanced tools
A simple cryptocurrencies converter component based on https://min-api.cryptocompare.com
A simple cryptocurrencies converter component based on https://min-api.cryptocompare.com. Min React version: 16.8.
npm install --save react-crypto-compare
First of all, you need a cryptocompare.com api key.
Then
import CryptoCompare from "react-crypto-compare";
// ...
<CryptoCompare from="EUR" to="BTC" amount={10} apikey="<YOUR_CRYPTOCOMPARE.COM_APIKEY>" />;
it renders
<div class="react-crypto-compare">
<span class="react-crypto-compare-amount">0.001408</span>
<span class="react-crypto-compare-currency">BTC</span>
</div>
You can set the api key just once to avoid passing it to the component
import CryptoCompare, { setApikey } from "react-crypto-compare";
setApikey("<YOUR_CRYPTOCOMPARE.COM_APIKEY>");
// ...
<CryptoCompare from="EUR" to="BTC" amount={10} />;
please note that the apikey prop, if passed, takes the precedence over the global api key set
though setApikey.
You can customize the look&feel of the component using its classes
.react-crypto-compare
.react-crypto-compare-error
.react-crypto-compare-loading
and its children ones
.react-crypto-compare-amount
.react-crypto-compare-currency
Run
cd example && npm run start
I've developed it because I'd some spare time (more less 4 hours) and I'd like to play with:
PR or issues are welcome 👋
Thanks goes to these wonderful people (emoji key):
Stefano Magni 💻 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
A simple cryptocurrencies converter component based on https://min-api.cryptocompare.com
We found that react-crypto-compare demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.