本页还没有译文
本页 10 段还没译成Español,下面显示的是英文原文。useLocation
还没翻译译自英文(reactrouter.com)本页 10 段都还没译
useLocation
Framework Data Declarative
Summary
Returns the current Location. This can be useful if you'd like to
perform some side effect whenever it changes.
import * as React from 'react'
import { useLocation } from 'react-router'
function SomeComponent() {
let location = useLocation()
React.useEffect(() => {
// Google Analytics
ga('send', 'pageview')
}, [location]);
return (
// ...
);
}Signature
function useLocation(): LocationReturns
The current Location object
AI 翻译查看英文原文