How to keep the current page/view when lazy loading?
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 do not know whether it is possible to instruct Suspense to use the current page/view as the fallback component until the next view is ready to be rendered.
Indeed, in order to achieve YouTube or GitHub like loading with a top linear progress bar on the current view, we need a way to instruct the Suspense component to not unmount the current view straight away or to just add an additional child component to the current view.
The documentation would benefit from adding such example, as this behaviour is now the industry norm and it greatly improves the UX. As on StackOverflow and other relevant forums no one seems to know how to do:
https://stackoverflow.com/questions/55669865/is-it-possible-to-keep-the-current-component-mounted-as-the-fallback-content-f
https://stackoverflow.com/questions/57741868/how-can-react-suspense-remain-on-the-same-page-lazyloading
However, I am not sure this is possible right now, and if not putting it on the backlog as a new feature will be useful.
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
Inizia esaminando il comportamento di Suspense descritto nell'issue e le due discussioni collegate per determinare se la vista corrente può rimanere montata durante il caricamento lazy. Documenta il comportamento supportato con un esempio di caricamento, se possibile, oppure chiarisci che il comportamento di fallback richiesto non è attualmente disponibile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, react
- Ambito
- documentation, frontend
- Tipo di issue
- Documentazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100