I have such kind of code:
function Child( { name: string } ) {
return (
<div>
{name ? (
<h3>
The <code>name</code> in the query string is "{name}
"
</h3>
) : (
<h3>There is no name in the query string</h3>
)}
</div>
);
}
and I got:
I was trying in many ways to pass name name
literal but TypeScript always complays, any idea how to make happy TypeScript?
The code is taken from: https://reactrouter.com/web/example/query-parameters