r/learnreactjs • u/FunMarzipan2158 • Dec 25 '22
Question about UI tree in react
Hello, i was reading new react beta docs and it is quite good.
When i read through the section: Preserving and Resetting State, i found this statement: React preserves a component’s state for as long as it’s being rendered at its position in the UI tree.
What is exactly this component's position? is it kind of react elements's children property order? or the third arguments of React.createElement()?
1
Upvotes
View all comments
Show parent comment
1
u/FunMarzipan2158 Dec 26 '22
u/Col_Parity Hey, Thanks for reply.
Maybe I can't fully understand how React makes UI Tree. I should dig in the fiber. thanks!