Commit 5bbf9be
authored
[DevTools] Model Hidden Offscreen Boundaries as Unmounts (#34062)
This is modeling Offscreen boundaries as the thing that unmounts a tree
in the frontend. This will let us model this as a "hide" that preserves
state instead in a follow up but not yet.
By doing it this way, we don't have to special case suspended Suspense
boundaries, at least not for the modern versions that use Offscreen as
the internal node. It's still special cased for the old React versions.
Instead, this is handled by the Offscreen fiber getting hidden.
By giving this fiber an FilteredFiberInstance, we also have somewhere to
store the children on (separately from the parent children set which can
include other siblings too like the loading state).
One consequence is that Activity boundary content now disappears when
they're hidden which is probably a good thing since otherwise it would
be confusing and noisy when it's used to render multiple pages at once.1 parent 8de7aed commit 5bbf9be
File tree
2 files changed
+142
-96
lines changed2 files changed
+142
-96
lines changedLines changed: 31 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
216 | 215 | | |
217 | 216 | | |
218 | 217 | | |
| |||
222 | 221 | | |
223 | 222 | | |
224 | 223 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
229 | 227 | | |
230 | 228 | | |
231 | 229 | | |
| |||
235 | 233 | | |
236 | 234 | | |
237 | 235 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
244 | 241 | | |
245 | 242 | | |
246 | 243 | | |
| |||
262 | 259 | | |
263 | 260 | | |
264 | 261 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
271 | 268 | | |
272 | 269 | | |
273 | 270 | | |
| |||
277 | 274 | | |
278 | 275 | | |
279 | 276 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
286 | 283 | | |
287 | 284 | | |
288 | 285 | | |
| |||
292 | 289 | | |
293 | 290 | | |
294 | 291 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
301 | 298 | | |
302 | 299 | | |
303 | 300 | | |
| |||
0 commit comments