Here I map though an array of objects that contain images to display on a page. At the moment when I try useRef it only grabs me the very last element. How can I have it so that my useRef grabs me multiple?
<div className='images-container'>
{skills.map((skill, idx) => {
return <div key={idx}>
<img alt={skill.name} ref={imageRef} src={skill.url} />
<p>{skill.name}</p>
</div>
})}
</div>
If I am understanding correctly use ref will only grab one of these elements so I suppose the best approach is to dynamically make different useRefs to grab individually? Sorry, just learning react.