Skip to content

v6.4: How to show Pending UI in case of slow loader #8914

Closed Answered by brophdawg11
devpeerapong asked this question in Q&A
Discussion options

You must be logged in to vote

Yep defer is what y'all are looking for here - let us know if this solves your use cases :)

https://beta.reactrouter.com/en/dev/guides/deferred

Also FWIW, the other idiomatic approach (before defer) would have been to useFetcher in your components and show skeletons/data based on those calls which would give you the "render then fetch" behavior you're looking for, instead of the default "fetch then render" behavior.

Replies: 6 comments 15 replies

Comment options

You must be logged in to vote
2 replies
@devpeerapong
Comment options

@sanelaxm
Comment options

Comment options

You must be logged in to vote
3 replies
@tommie-lie
Comment options

@mattiaz9
Comment options

@tommie-lie
Comment options

Comment options

You must be logged in to vote
1 reply
@pawelphilipczyk
Comment options

Comment options

You must be logged in to vote
7 replies
@JakubAndrysek
Comment options

@GideonMax
Comment options

@danillewin
Comment options

@brophdawg11
Comment options

@danillewin
Comment options

Answer selected by brophdawg11
Comment options

You must be logged in to vote
2 replies
@brophdawg11
Comment options

@franklinjavier
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet