This is how I am getting the state, but how can I map through coin inside the JSX
For some reason I cant map through the coin array :
import React, { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { getstats } from '../Redux/stocks/stockreducer';
export const Stats = () => {
const dispatch = useDispatch();
useEffect(() => dispatch(getstats('Qwsogvtv82FCd')), []);
const stats = useSelector((state) => state.stocks);
console.log(stats);
return (
<div className="main">
<h1>Stats Page</h1>
{stats.map((item) => (
<>
<p key={item.uuid}>name: {item.name}</p>
</>
))}
</div>
);
};