Closed alex153410 closed 5 years ago
Hi @alex153410.
Did you try to rewrite the code of Route as follows?
<Route exact path='/order/:id' component={() => <OrderPage/>}/>
Thx, this code solved the issue: the warning disappeared and the :id is respected and recognized.
I am using React-router 5.0.1 https://reacttraining.com/react-router/web/guides/quick-start with code:
And I am creating my React components as the classes (inheriting Componet) and not the function. and I have declarations at the end of my files for OrderList and OrderPage:
Unfortunatley, the Route with the OrderPage is giving the warning:
I am not sure whether it is React-router or React-alert issue, but - I guess - it would be nice if I could use useAlert in React components that are created as classes.