Tried to made a dummy id array inside another file and tried to imported here but still same error. Here is my code
return (
<div className="restraunt-list" >
{Array(15)
.fill("")
.map((e) => (
<div className="shimmer-card"> </div>
))}
</div>
);
};
export default Shimmer;
Error I am getting
index.js:1 Warning: Each child in a list should have a unique "key" prop.
Check the render method of `Shimmer`. See https://reactjs.org/link/warning-keys for more information.
at div
at Shimmer
at Body
at AppLayout