saeedmalikx / react-fiber-architecture Goto Github PK
View Code? Open in Web Editor NEWUnderstanding the structure of React Fiber( walk through and pseudo-code)
Understanding the structure of React Fiber( walk through and pseudo-code)
Hi!
I found this very helpful. I am still not sure I fully understand everything, but I think it helped me get a better deep understanding of React.
However, I have a question which I am not sure whether it's a typo.
In the list of properties of a Fiber you say:
stateNode: The local state associated with this fiber
However, then it seems that the stateNode
actually contains an instance of a component.
For example, in processChildContext:
parameters(fiber, type, parentContext)
const instance = fiber.stateNode;
const childContextTypes = type.childContextTypes;
let childContext
get the instance of the child context using the stop/start PhaseTimers
return {...parentContext, ...childContext};
When you are talk about the local state of the Fiber, what do you mean? Is that the local state of the component?
Thanks and keep sharing this notes!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.