Skip to content
New issue

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

Don't reload Playroom on every story change #2

Open
rbardini opened this issue Feb 9, 2020 · 0 comments
Open

Don't reload Playroom on every story change #2

rbardini opened this issue Feb 9, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rbardini
Copy link
Owner

rbardini commented Feb 9, 2020

Playroom doesn't seem to update its code editor on URL hash changes. That's why the addon panel assigns the code-appended URL to the iframe key prop, so that React recreates the element and reloads Playroom whenever new code should be used:

return (
<Iframe key={url} allowFullScreen src={url} title="Playroom" />
);

Ideally, we should be able to update the iframe's src alone and Playroom would pick up the new code. This may require changes to Playroom though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant