{loading ? (
<strong>Loading...</strong>
) : (
<ul>
{coins.map((coin) => (
<li>
{coin.name} {coin.symbol} :{" "}
{Math.round((myMoney / coin.quotes.USD.price) * 100) / 100}
{" "}
{coin.symbol}
{" can buy!"}
</li>
))}
</ul>
)}
This is for React beignner Project,
now this source makes all coin objects return.
i already find how to use javascript statement. but can't find the way.
coin
is using other website api(https://api.coinpaprika.com/v1/tickers)
how can i fix this problem?
you can easily use
let startIndex=0;
let endIndex=50;
let coins50 = coins.slice(startIndex, endIndex)
also, you must define paging to show the rest of the data notice: you must keep data to component state