sandpack icon indicating copy to clipboard operation
sandpack copied to clipboard

Flickering when switching between files when initMode is "lazy" or "user-visible"

Open SamCreasey opened this issue 1 year ago • 0 comments

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

SamCreasey avatar Jan 30 '24 13:01 SamCreasey