Post
2026年3月6日 下午05:17
歡迎所有互動

好像很難避免套黑魔法耶⋯⋯

🫠

還沒有人留言。想成為第一個嗎?
開發 mur457 篇文章
歡迎所有互動

🤔

好像值得試試看

歡迎所有互動

突然意識到我可能是少數會傻傻拿View Transition API去撞Top Layer的人了🫠

歡迎所有互動

很好,這樣順多了🫠

歡迎所有互動

不是很重要

React的useEffect,parent cleanup 會在children cleanup之前執行。

We guarantee that parent effects are destroyed before the child ones. The reason for this is that parents often tend to depend on some resource created by the child. Such as removing a listener from a DOM node managed imperatively by a child. If the child disposes its resources first, the parent might not be able to properly clean itself up. This is not specific to Hooks — it’s how componentWillUnmount works as well.