V
V
Vladimir Golub2019-08-06 15:12:29
React
Vladimir Golub, 2019-08-06 15:12:29

How to link to xml file in react-router?

How to make proper transition to xml file in react-router ? The xml file must be accessible from the link. Currently - Cannot GET /rss/test.xml I'm using webpack dev server.
<Route path="/rss/test.xml" />

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-08-06
@RazerVG

You need to use the a tag:
If you want to use a file-loader to move a file to a static build directory, then:
react-router is used exclusively for client navigation and tree rendering based on the location value.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question