useInRouterContext

useInRouterContext

总结

参考文档 ↗

如果此组件是 Router 的后代,则返回 true,这有助于确保组件在 Router 内使用。

签名

useInRouterContext(): boolean
文档和示例 CC 4.0