Hello I want to pass in props to another component through Link Router
I am using Class Component
constructor(props: IBanner) {
super(props);
this.state = {
jobCategories: [],
jobKeyword: "",
jobLocation: "",
};
}
and here is my
Link Router
<Link {{
pathname: '/search-results',
state: {
jobKeyword: this.state.jobKeyword, jobLocation: this.state.jobLocation
}
}}>
<li className="ktp-banner-submit">
{" "}
<input type="submit" value="" />{" "}
<i className="ktp-icon ktp-search"></i>{" "}
</li>
</Link>
However I am getting an error of Property 'to' is missing in type '{ children: Element; pathname: string; state: { jobKeyword: string; jobLocation: string; }; }' but required in type 'LinkProps'
What error is this and what can i do to mitigate this/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…