Using revealOrder="backwards" in SuspenseList only works for very short wait times
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 11.8k
- Fork
- 7.9k
- Merge medio
- 1g 11h
- PR unite (30g)
- 11
Descrizione
I realize that this is still experimental, but I figured it would still be good to report bugs. If not, feel free to close this issue.
I was playing around with the examples in https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist and noticed that revealOrder="backwards" didn't seem to work. The trivia items never appear before the posts. After fiddling around with the example in https://codesandbox.io/s/black-wind-byilt i noticed that it works if the timeout is set around 500 ms or below for the trivia items. But if you set it to for example 1000 ms, it will instead wait until both trivia and posts are available.
revealOrder="forwards" seems to work regardless of how long the timeout is.
I tried changing React version to the latest experimental version (0.0.0-experimental-c76e4dbbc-20210722), but it did not seem to make a difference.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci l’esempio di SuspenseList dalla documentazione di React e dal CodeSandbox collegato, confrontando revealOrder="backwards" con ritardi trivia di 500 ms e 1000 ms. Inizia verificando la versione sperimentale segnalata di React e il comportamento del timeout dell’esempio; il lavoro è completato quando la causa è stata identificata e il comportamento dell’ordine backwards per attese più lunghe è stato corretto o affrontato chiaramente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, react
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100