How to keep the current page/view when lazy loading?
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- JavaScript
- Estrelas
- 11.8k
- Forks
- 7.9k
- Merge médio
- 1d 11h
- PRs com merge (30d)
- 11
Descrição
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.
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece revisando o comportamento de Suspense descrito na issue e as duas discussões vinculadas para determinar se a visualização atual pode permanecer montada durante o lazy loading. Documente o comportamento compatível com um exemplo de carregamento, se possível, ou esclareça que o comportamento de fallback solicitado não está disponível atualmente.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- javascript, react
- Domínio
- documentation, frontend
- Tipo de issue
- Documentação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 25/100