用法与hook一模一样。
···javascript
const [path, setPath] = usePath();
···
项目地址:react-use-path
CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。