Skip to content

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

@doc-han

Description

@doc-han

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/

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions