Having A Problem Loading In Data To Child Component In React
I am building a gallery where you click on the image and it will load in a separate component using props, this image is a URL, taken from a hard-coded array, where the src is load
Solution 1:
You should be able to use the router Link
to pass data via "state" on the to
property.
From React Router's documentation:
<Linkto={{pathname:"/images",state: { imgUrl:props.src }
}}/>
Post a Comment for "Having A Problem Loading In Data To Child Component In React"