We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
感觉现在 react-router-dom 6.2 + vite-plugin-pages 这种组合下来的开发模式,导致页面闪烁(白屏)挺严重的。现在 pages 里的 importMode 用了 async 模式,导致 App.tsx 必须套一层 Suspense。在我们去缓存了的页面还好,但去新页面的时候必然导致白屏,而且这种把整个页面套进 Suspense 里以后也不好做过渡。
importMode
async
App.tsx
Suspense
比较理想的是 Next 那种 Link,加载好数据后再切换页面 (但这样是不是和 #12 中打算做 SPA 有点背道而驰了,现在感觉是嘴上说着做 SPA 但代码里处处是 MPA) ,react-router-dom 中貌似要 6.4 才能实现这种效果。而又由于 vite-plugin-pages 的限制没那么好升级 react-router-dom。
The text was updated successfully, but these errors were encountered:
其实是没有 Loading 的动效,弄个动效加到 Suspense 的 fallback 里应该会好不少
Sorry, something went wrong.
恐怕不是加个动效这么简单吧😂,就算加了动效,整个页面还是会切换到那个动效组件里,然后又切回来。这样整个页面的 Layout 就被破坏了。
Successfully merging a pull request may close this issue.
感觉现在 react-router-dom 6.2 + vite-plugin-pages 这种组合下来的开发模式,导致页面闪烁(白屏)挺严重的。现在 pages 里的
importMode
用了async
模式,导致App.tsx
必须套一层Suspense
。在我们去缓存了的页面还好,但去新页面的时候必然导致白屏,而且这种把整个页面套进Suspense
里以后也不好做过渡。比较理想的是 Next 那种 Link,加载好数据后再切换页面
(但这样是不是和 #12 中打算做 SPA 有点背道而驰了,现在感觉是嘴上说着做 SPA 但代码里处处是 MPA),react-router-dom 中貌似要 6.4 才能实现这种效果。而又由于 vite-plugin-pages 的限制没那么好升级 react-router-dom。The text was updated successfully, but these errors were encountered: