How to keep the current page/view when lazy loading?
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 11.8k
- Forks
- 7.9k
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 11
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza revisando el comportamiento de Suspense descrito en el issue y las dos discusiones enlazadas para determinar si la vista actual puede permanecer montada durante la carga diferida. Documenta el comportamiento compatible con un ejemplo de carga si es posible, o aclara que el comportamiento de fallback solicitado no está disponible actualmente.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, react
- Área
- documentation, frontend
- Tipo de issue
- Documentación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100