React hot replaces two parameters of module.hot.accept related to react-hot-loader

problem description

if you modify the router, the browser will refresh, and the rest will be hot replaced. This is the result of the present
search for things related to hot replacement plug-ins. I would like to ask what is the intention of the first parameter of these two parameters

.

the environmental background of the problems and what methods you have tried

here, it doesn"t go into details ( https://github.com/brickspert.)
and why the callback function can"t use getRouter () directly but require again

.

related codes

/ / Please paste the code text below (do not replace the code with pictures)
import React, {Component} from "react";
import ReactDOM from" react-dom";
import {AppContainer} from "react-hot-loader";

import getRouter from". / src/router";

const boot = (elements) = > {

ReactDOM.render(
    <AppContainer>
        {elements}
    </AppContainer>
    , document.getElementById("app"));

}
let rs = getRouter ();
boot (rs);

if (module.hot) {

module.hot.accept("./src/router", ()=> {
    boot(require("./src/router").default())
});

}

Apr.02,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eadd96-218b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eadd96-218b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?