【发布时间】:2018-08-23 15:04:20
【问题描述】:
我想在 React 应用程序中读取并打印当前 URL。现在我正在使用“window.location.pathname”来读取 URL,但想知道是否有更好的方法或某种反应方式来读取 URL
【问题讨论】:
-
如果你用的是路由器,可以看看这个github.com/ReactTraining/react-router/blob/master/packages/…
标签: javascript reactjs