sandpack
sandpack copied to clipboard
Flickering when switching between files when initMode is "lazy" or "user-visible"
Bug report
Packages affected
- [ ] sandpack-client
- [x] sandpack-react
Description of the problem
When switching between files in the SandpackFileExplorer or in the SandpackCodeEditor tabs and initMode is "user-visible" or "lazy" there is a brief flickering before the component renders correctly. This is not something that occurs when initMode is "immediate".
What steps can we take to reproduce the problem?
Change options.initMode to "user-visible" or "lazy" in SandpackProvider.
This is also reproducible in the Sandpack documentation, as this example does not have flickering, but this one does.
Link to sandbox: link
Your Environment
| Software | Name/Version |
|---|---|
| Sandpack-client version | 2.11.2 |
| Sandpack-react version | 2.11.3 |
| Browser | Chrome / 121.0.6167.85 |
| Operating System | MacOS / 13.6 |