0.1.4 • Published 3 years ago
coingecko-prices-provider v0.1.4
About coingecko crypto prices
coingecko crypto prices provides a simple context provider and hooks react app for using live plug and play prices. 🔴WIP LIBRARY🔴
Getting Started
Install React Crypto Icons from npm
npm install coingecko-prices-providerOr with yarn
yarn add coingecko-prices-providerUsage
import {
  CoingeckoPricesProvider,
  useCoingeckoPrices,
} from "coingecko-prices-provider";
const Example = () => {
  const { price: balPrice } = useCoingeckoPrices(
    "0xba100000625a3754423978a60c9317c58a424e3D"
  );
  return <div>Bal: {balPrice}</div>;
};
const App = () => {
  return (
    <div className="App">
      <CoingeckoPricesProvider>
        <Example />
      </CoingeckoPricesProvider>
    </div>
  );
};
export default App;