()
| 184 | // 内容 commit 后运行,时序正确,且 <main> 可能换成另一棵子树的新节点)。 |
| 185 | useEffect(() => { |
| 186 | const onNav = () => { |
| 187 | if (currentHref() !== decidedHrefRef.current) return; |
| 188 | runDecisionRef.current(); |
| 189 | }; |
| 190 | window.addEventListener("popstate", onNav); |
| 191 | window.addEventListener("hashchange", onNav); |
| 192 | return () => { |
nothing calls this directly
no test coverage detected