I’ve tried some options I found, like useParams() or other tricks but it’s not working. I think I’m missing something Fundamental. Here is my code
ReactDOM.render(
<HashRouter>
<App />
</HashRouter>,
document.getElementById("root")
);
function App(){
return(
...
<Switch>
<Route exact path={["/", "/movies"]} component={MoviesList} />
<Route exact path="/add" component={AddMovie} />
<Route path="/movies/:id" component={Movie} />
</Switch>
);
}
Here is my component to use id
export default function Movie(props) {
...
useEffect(() => {
getMovie(props.match.params.id);
}, [props.match.params.id]);
};
I try inside function Movie useParams() and other things. But doesn’t work. When I console.log(props.match.params.id) it appears perfect and in the url also.
Here is an example , check the player component from this link https://codesandbox.io/s/jzn9rnm6ov?file=/components/Player.js:0-656
The part you need
The Full component
tadalafil prescription online – generic tadalafil buy real tadalafil online
celebrities on propecia – http://propechl.com/ propecia wiki
Apzemy – how to buy generic viagra online Svmkrc hqqmxm
Zixwup – essay helper site Vdtylo gxdqvh
Alogau – cobra viagra Uxggex jnkxrm
Xxijbh – propecia prescription canada Lqougk ndntnr
Zlowre – how long does it take for sildenafil to take effect Pbmgnh utiuzx
Zruexp – buy essay online cheap Hbdtjo pzztdt
Wulmgp – lasix dosage Mqtwzn svzroc
Ikbgvf – how much does vardenafil cost Udppdd hcnvbl