Do not overlap layout by fallbackElement
.
#10662
valerii15298
started this conversation in
Proposals
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanna use
lazy
route property for code splitting to loadelement
dynamically.But when I click a link app is unresponsive and fallbackElement is not shown anywhere...
Also when I navigate to the nested route, when
lazy
is called, The onlyfallbackElement
is shown without layout.This is quite a problem(at least for me).
lazy
Route property is simply unusable right now...There is no point to use
lazy
if you cannot specifyfallbackElement
for it and still show parent's route layout when loading...Reproduction: https://codesandbox.io/p/sandbox/determined-archimedes-t443gj?file=%2Fsrc%2FApp.tsx%3A19%2C15
Also in repro there are quite bunch of other bugs like showing nested rows in parent when it should not(not sure if it is because of codesandbox itself) and also when clicking on a link
fallbackElement
is not shown at all which is a horrible user experience!For example using React's
Suspense
andReact.lazy
works perfectly and saves layout from parents rout:Uncomment this lines in repro:
and comment this:
And you will see that everything works fine when using React's Suspense...
Beta Was this translation helpful? Give feedback.
All reactions