锤子前端
11:46 · 2025年5月1日 · 周四
#React #原理 #文章 子组件的 useEffect 会在父组件的 useEffect 之前执行,这是由于 React 的深度优先遍历算法。
https://frontendmasters.com/blog/react-internals-which-useeffect-runs-first/
Frontend Masters
React Internals: Which useEffect runs first?
useEffect is one of the most commonly used hooks in the React community. Regardless of how much experience you have with React, you’ve probably used it before.
Home
Tags
About
Powered by
BroadcastChannel
&
Sepia