brasiliapp / web

Plataforma web que ajuda a população brasileira a monitorar as despesas de cota parlamentar, verbas de gabinete e falas dos deputados federais nas sessões da Câmara dos Deputados.
https://brasiliapp.com.br
36 stars 12 forks source link

Improve UX by implementing Streaming UI and instant loading to the /deputado-federal page #27

Closed viictorcamposs closed 1 year ago

viictorcamposs commented 1 year ago

Description

Next.js 13 provides a way to enable instant loading of pages by using Streaming UI and Suspense boundaries.

I'm using this feature by creating a loading.js file inside the /deputado-federal route and adding a skeleton for the table.

This way, even if the user has a poor internet connection, we can display something on the page to let them know there's content being loaded.

How to test

  1. open your browser inspector
  2. select the network tab
  3. disable the cache
  4. select the Slow 3G throttling
  5. open the /deputado-federal page

Images

Screenshot 2023-10-04 at 21 39 54

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
brasiliapp-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2023 1:04am