barbar/vortigern

Stale DOM classnames: changing component classname requires server restart

jackmahoney opened this issue · 1 comments

Issue:
Changing the className property of a component or container does not update the DOM that is served by the server and displayed in the browser. This is not expected behaviour. Altering a components className should hot swap the new component with the new class.

Evidence:
Notice that I change the className and the text inside the home component. When I reload the page the text has changed but the className hasn't. When I then reload the server the className has changed.
image

How to replicate:

  • clone latest vortigern
  • yarn install && yarn start
  • load http://localhost:8889/
  • see that the Home component has a Home class.
  • edit src/app/containers/Home/index.tsx and add another class to the container
  • wait for HMR to reload the browser.
  • notice that the new class DOES NOT appear in the dom

Any help with this would be hugely appreciated at my team and I love this repo but are currently forced to reload the server every time we change a className, which is a lot, so it's slowing us down quite a bit.

Thanks, Jack

Having the same issue. Quick fix would be appreciated