I want to pass some info from one .tsx file to another (one view to another) by clicking a link. How can I achieve this in Preact.
Main.tsx
<Router onChange={(r) => setTitle(getTitle(r))}
routes={{
'/': <RouteComponent component={ContactForm} />,
'/faq/:user?': <RouteComponent component={Faq} />
}} />
ContactForm.tsx
<RouteLink href={`/faq/Jason`} > here</RouteLink>
Faq.tsx
const Faq = ({ user, ...props }) => {
console.log(user);
...
My ContactForm.tsx is loading correctly but clicking on a link on that page, I believe, its not going to Faq.tsx. It takes me to Faq.tsx if I remove the query parameters but I need to pass the name 'Jason' from ContactForm.tsx to faq.tsx
Thanks