您可以将标记用于外部网址,
<a href='https://domain.extension/external-without-params'>external</a>
但您也可以提供这样的组件:
<Route path='/external' component={() => { window.location = 'https://domain.extension/external-without-params'; return null;} }/>
使用react-router-dom重定向到第三方URL
您可以将标记用于外部网址,
<a href='https://domain.extension/external-without-params'>external</a>
但您也可以提供这样的组件:
<Route path='/external' component={() => { window.location = 'https://domain.extension/external-without-params'; return null;} }/>