score:0

Accepted answer

if the imageurl is inside the props passed to the menu item you can just put it in inline

const menuitem = (props) => {
    return(
        <div style={{ backgroundimage: `url(${props.imageurl})` }}>
            <h1 classname='title'>{props.title}</h1>
            <span classname='subtitle'>shop now</span>
        </div>
    )
}

Related Query

More Query from same tag