I have problem passing id
to my page with product, I tried everything and search answer but it still doesn\'t work.
Here is my index.js:
impor
I assume you are not using react-router v4
but either v2.x.x
or v3.x.x
. In that case you should restructure your routes and you can pass multiple component using the components props as
And in the Menu Component
Also the way you want it work is relatively very easy to do using react-router v4
. In that case you can make use of prop render to provide a component and you could do the following with it
import {HashRouter as Router, Route} from 'react-router-dom';
...
( )}>
(asd )}>