MCPcopy
hub / github.com/kriasoft/react-starter-kit / render

Function render

src/app.js:44–56  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

42}
43
44function render(state) {
45 Router.dispatch(state, (_, component) => {
46 ReactDOM.render(component, container, () => {
47 // Restore the scroll position if it was saved into the state
48 if (state.scrollY !== undefined) {
49 window.scrollTo(state.scrollX, state.scrollY);
50 } else {
51 window.scrollTo(0, 0);
52 }
53 cleanUp();
54 });
55 });
56}
57
58function run() {
59 let currentLocation = null;

Callers 1

runFunction · 0.85

Calls 2

cleanUpFunction · 0.85
renderMethod · 0.45

Tested by

no test coverage detected