I
I
Igor Shumilovsky2015-10-29 11:33:12
React
Igor Shumilovsky, 2015-10-29 11:33:12

How to configure react-router so that when the page is updated, the routing does not break?

When I use routing without browserHistory, the pages are saved when updating. When with browserHistory, then when I refresh the page, I see a white screen with a message that the component cannot be found. How to setup?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Shumilovsky, 2015-10-30
@JiSeven

The problem is solved by adding to the webpack config:

devServer: {
    historyApiFallback: true
  }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question