Comments (3)
You can find the different types of levels here though (if I understood the document correctly):
from react-fiber-architecture.
Hey @acdlite. Thank you for the detailed write up. 😃✋As @reccanti mentioned, ReactPriorityLevel
is either absent or has been moved into a different module in the react codebase. Could you point how to fix this? I think this is minor and can be quickly resolved. Thanks again! 😄
from react-fiber-architecture.
Based on my understanding (I can be wrong) it looks like the concept of priorities is gone for now. Instead we have "Sync" and "Async" units of work.
If you look at the workLoop function we have:
function workLoop(isAsync) {
if (!isAsync) {
// Flush all expired work.
while (nextUnitOfWork !== null) {
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
}
} else {
// Flush asynchronous work until the deadline runs out of time.
while (nextUnitOfWork !== null && !shouldYield()) {
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
}
}
}
So basically render everything right away if we're dealing with a regular update, or if it's an async update render it if we have the time to do so.
shouldYield
checks if we have enough time to render the current unitOfWork.
from react-fiber-architecture.
Related Issues (16)
- Why the key and type are copied over directly?
- [created accidentally, sorry] HOT 1
- When will react-fiber be released officially? HOT 3
- Best place to find information about customer renderers? HOT 1
- A Chinese translation 😄 HOT 1
- waiting for future sections
- Can't find further sections HOT 5
- Broken link
- It is bad practice to use useEffect(async ()=> { await something } ):
- The Section "pendingWorkPriority" is out of date HOT 1
- Confusion HOT 2
- Link to ReactPriorityLevel is broken
- React Reconciliation Article HOT 1
- Link to key PRs and meeting notes HOT 3
- Why is the numerical value of "pendingWorkPriority" inversely proportional to its meaning? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-fiber-architecture.