Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.hot.accept();
// remember data on dispose
module.hot.dispose(function(data) {
data.state = store.getData();
if (stop) stop();
});
//apply data on hot replace
if (module.hot.data) store.load(module.hot.data.state);
}
//routing
Url.setBaseFromScript("app*.js");
History.connect(store, "url");
//debug
Widget.resetCounter();
Timing.enable("app-loop");
Debug.enable("app-data");
//app loop
import Routes from "./routes";
let stop = startAppLoop(document.getElementById("app"), store, Routes);
import { startHotAppLoop, History } from "cx/ui";
import { Debug } from "cx/util";
import Routes from "./routes";
import "./index.scss";
import { Store } from "cx/data";
const store = new Store();
History.connect(
store,
"url"
);
Debug.enable("app-data");
startHotAppLoop(module, document.getElementById("app"), store, Routes);