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

[HMR]: Several issues with hot module realoading. #14

Open
4 tasks
doc-han opened this issue Oct 27, 2024 · 1 comment
Open
4 tasks

[HMR]: Several issues with hot module realoading. #14

doc-han opened this issue Oct 27, 2024 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@doc-han
Copy link
Owner

doc-han commented Oct 27, 2024

Description

xtensio provides hot module reloading to developers and this is supported mainly in popup, pages & contents.
Most of our issues exist in HMR for contents. This is because we manage to provide HMR to code that is supposed to manipulate an existing website.

Issues

  • Reloading a content page re-applies all previous HMR modules. It's expected to start from the final state reached.
  • State loss when a React component is updated. eg. when a component has states & some text, updating the text will reset all the states
  • Issues with Error recovery. when a component has some errors which are later corrected, the client app doesn't recover from the error but still shows the error page.
  • Entry point module update issues. currently, our users write code at the entry point which is wrong. In HMR update at the entry point mostly require a full reload of the application. Hence, we need to move user code 1-level above entry code.

What to look for

Below are some resources which will be vital in making HMR awesome in xtensio.

  1. How should we set up apps for HMR now that Fast Refresh replaces react-hot-loader? facebook/react#16604 (comment)
  2. https://webpack.js.org/api/hot-module-replacement/
@doc-han doc-han added bug Something isn't working help wanted Extra attention is needed labels Oct 27, 2024
@doc-han doc-han self-assigned this Oct 27, 2024
@doc-han
Copy link
Owner Author

doc-han commented Oct 28, 2024

Most of these issues go away when mount isn't done where the Entry React component is written.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant