-
Notifications
You must be signed in to change notification settings - Fork 194
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
Doesn't refresh inside iframe #743
Comments
any updates of this? |
Hi, can you explain the use case further? How does |
<Iframe src="localhost:8000/page2" / >
2. on `page2`: localhost:8000/page2 has below code
page2
while page2 has any change if it placed at <iframe src=.... /> it wont trigger HMR refresh if we directly open |
I think this issue was caused by externalize react. https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/docs/TROUBLESHOOTING.md#externalising-react |
@ethanyou725 do you have any idea for handle webpack |
Trying to make React Refresh work with React Cosmos and it only seems to works when the renderer is loaded outside an iframe.
How to replicate
Clone react-cosmos repository
Build the packages
Start the webpack example
There are two ways to load a fixture (say the "CounterButton" one)
Now you'll notice that if you make changes to the source file
react-cosmos/examples/shared/components/CounterButton.tsx
, say add some text after the button suffix, the changes are reflected in the 2nd tab but not in the 1st.This is kind of odd because the exact same code runs in both places, but in the 1st tab the component won't update until the entire browser page is reloaded. The only difference is that in the 1st case the renderer runs inside an iframe.
Does anyone know how putting the renderer inside an iframe could interfere with this plugin?
Any ideas are welcome. Thanks!
The text was updated successfully, but these errors were encountered: