DEV Community

Discussion on: Creating better user experiences with React 18 Suspense and Transitions

Collapse
 
pcjmfranken profile image
Peter Franken

Now instead of switching tabs immediately we stay on the tab we're on and continue to show its content until the new tab's content is ready

But the user took an action with the intent to navigate away from the old content immediately - they are done with it for now. Replacing the previous content with a loading indicator reassures the user that their click registered, that their request is being worked on, and where on the screen they can expect for it to be rendered.

Nice overview and useful links nevertheless!

Collapse
 
tmns profile image
tmns

Thanks!

A loading indicator is still shown in our new example however; so, the user continues to be reassured that their click registered, their request is being worked on, and where they can expect the new content to be rendered 🙂

The difference is the old state isn’t blown away completely while waiting for the new state. In general, this gives the perception of a faster load, even if the loading time is actually the same. Further, on a slow connection, having content one can still interact with rather than just a loading indicator makes for a much nicer experience.

In this simple example, we just have some static content, but imagine it’s dynamic with other actions the user can perform. Maybe while waiting the user changes their mind and wants to perform a different action. There are many possibilities.

At the end of the day, you know your users best. For a lot of folks though — this is going to be an easy win for UX.