I am trying to access match prop from a child component but I cant since I see it is no longer supported. Is there an alternative to this or is there another way I can access these parameters from child component without tunneling or downgrading react-router?
import React from "react";
import './menuItem.style.scss'
import { withRouter } from "react-router";
const MenuItem = ({title, imageUrl,size,linkUrl, match}) => (
// console.log(match),
<div className={`${size} menu-item`} onClick={ ()=> window.history.push(`${match.url}${linkUrl}`)}>
<div style={{backgroundImage: `url(${imageUrl})`}} className="background-image" ></div>
<div className="content">
<h1 className="title">{title.toUpperCase()}</h1>
<span className="subtitle">Shop Now</span>
</div>
</div>
);
export default withRouter(MenuItem);