我的应用程序正在运行react 15.3
和react-router 4.0.0
。路由使用link
库中的react-router
来将组件与实际网址匹配。
我想弄清楚的是如何在不重新加载页面的情况下更改协议。例如
http://example.org/foo
到https://example.org/foo
(甚至从http://example.org/
到https://example.org/foo
)
并且错误
我试过<Link to={'https://example.com/foo} />
但它不起作用。似乎Link to
适用于相对路径。
有什么想法吗?