mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
We should favor outlining a boundary if it contains Suspensey CSS or
Suspensey Images since then we can load that content separately and not
block the main content. This also allows us to animate the reveal.
For example this should be able to animate the reveal even though the
actual HTML content isn't large in this case it's worth outlining so
that the JS runtime can choose to animate this reveal.
```js
<ViewTransition>
<Suspense>
<img src="..." />
</Suspense>
</ViewTransition>
```
For Suspensey Images, in Fizz, we currently only implement the suspensey
semantics when a View Transition is running. Therefore the outlining
only applies if it appears inside a Suspense boundary which might
animate. Otherwise there's no point in outlining. It is also only if the
Suspense boundary itself might animate its appear and not just any
ViewTransition. So the effect is very conservative.
For CSS it applies even without ViewTransition though, since it can help
unblock the main content faster.
|
||
|---|---|---|
| .. | ||
| npm | ||
| src | ||
| flight-client.js | ||
| flight-modules.js | ||
| flight-server.js | ||
| index.js | ||
| package.json | ||
| persistent.js | ||
| README.md | ||
| server.js | ||