#vite triggers [full page reload] instead of [hmr update] (React)

1 messages · Page 1 of 1 (latest)

arctic rampart
#

When doing micro updates like editing the html inside a react component [regardless of the component itself (unless it deals with routing)]
vite should do an hmr update, however it is acting weirdly and triggering a full page reload when editing a specific component (here's it's code and folder structure)

#
import ModalBase from "./ModalBase"

/**
  * @param {Object}   props
  * @param {boolean}  props.hide
  * @param {Function} props.set_hide
  */
export default function ModalConfirm({ hide = true, set_hide }) {
  return (
    <ModalBase hide={hide} set_hide={set_hide}>
      <h4 className="card-label">Confirmer</h4>
    </ModalBase>
  )
}
#

The file system structure

- widgets
  - modal
    - ModalBase.jsx
    - ModalConfirm.jsx
#

btw I almost forgot to mention