0
<Provider store = {store}> <Router history = {history} > <section> <Route path="/" component={DealList}/> <Route path="/deal" component={FormDeal}/> <Footer/> </section> </Router> </Provider> 

I have this react router setup
Now if i call /deal , then the result is the combination of / and /deal path.
What is going wrong here

2
  • Check the Route docs for exact Commented Sep 11, 2017 at 11:19
  • 1
    switch is what will be useful to you. Along with it as @bennygenel suggested, you can make use of exact keyword Commented Sep 11, 2017 at 11:21

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.