Create a component that displays an image from a given hardcoded URL using props.
EasyProblem Statement
Create a component that displays an image from a given hardcoded URL using props.
Sample Input
imageUrl = 'https://via.placeholder.com/150'
Sample Output
An image is displayed on the screen.
Limits
Time: 2s · Memory: 256 MB
Code Editor
00:00
import React from "react";
const ImageDisplay = (props) => {
// Use props.imageUrl to render an <img> tag
};
export default ImageDisplay;
Input
imageUrl = 'https://via.placeholder.com/150'
Expected Output
An image is displayed on the screen.