Using dynamic routing with JSX on FreshJs Framework
xxxxxxxxxx
import {PageProps} from "$fresh/server.ts";
export default function func_E_Name(PageProps){
//It's a joke, laugh...
console.log(PageProps.params.userName)
return(
<div>
Name is <br/>
{PageProps.params.userName}
</div>
);
}
The name of the file should be "[userName].jsx"
To call the value of the dynamic route you must refer to it as "PageProps.params.DYNAMIC_ROUTE_VARIABLE_NAME". In the example above the dynamic route variable name is "userName"