Skip to content

Instantly share code, notes, and snippets.

@perjo927
Created September 8, 2020 16:53
Show Gist options
  • Save perjo927/4d815853065481d0188bd0a7336b6657 to your computer and use it in GitHub Desktop.
Save perjo927/4d815853065481d0188bd0a7336b6657 to your computer and use it in GitHub Desktop.
Mature Main File
import css from "./main.css";
import { createStore } from "./redux/store/index";
import { actions } from "./redux/actions/index";
import { rootReducer } from "./redux/reducers/index";
import { render } from "lit-html";
import { App } from "./templates/App";
const store = createStore(rootReducer, {});
export default () => {
// Initial render
render(App({ store, actions }), document.body);
// Subsequent renders
store.subscribe(() => render(App({ store, actions }), document.body));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment