Skip to content

Preview window not updating with files prop. #944

@CTNicholas

Description

@CTNicholas

Bug report

Packages affected

  • sandpack-client
  • sandpack-react

Description of the problem

Hey, I've got a better repro this time! The preview doesn't always display the correct files after the SandpackProvider files prop has been updated.

What were you doing when the problem occurred?

Updating the files prop dynamically.

What steps can we take to reproduce the problem?

Watch my short Loom video and then open the Sandbox.

TLDW: I'm editing the files prop, when the preview updates, it shows an unstyled version of the previous set of files, instead of the current files. The internal sandpack.files state is correct.

Link to sandbox: link (optional)

Your Environment

Software Name/Version
Sandpack-client version
Sandpack-react version 2.6.4
Browser Chrome
Operating System Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew issues that needs consideration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions