How to use the lit-redux-router.connectRouter function in lit-redux-router

To help you get started, we’ve selected a few lit-redux-router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ProjectEvergreen / greenwood / test / cli / cases / build.default.workspace-template-app / src / templates / app-template.js View on Github external
import { applyMiddleware, createStore, compose as origCompose, combineReducers } from 'redux';
import { lazyReducerEnhancer } from 'pwa-helpers/lazy-reducer-enhancer.js';
import thunk from 'redux-thunk';

// eslint-disable-next-line no-underscore-dangle
const compose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || origCompose;

// eslint-disable-next-line
const store = createStore(
  (state, action) => state, // eslint-disable-line
  compose(lazyReducerEnhancer(combineReducers), applyMiddleware(thunk)));

import '../index/index.js';
import './list';

connectRouter(store);

class AppComponent extends LitElement {
  render() {
    return html`
        MYROUTES
        <p id="custom-app-template">My Custom App Template</p>
    `;
  }
}

customElements.define('eve-app', AppComponent);
github ProjectEvergreen / greenwood / www / templates / app-template.js View on Github external
import thunk from 'redux-thunk';
import '../components/header/header';
import '../components/footer/footer';
import '../components/loading/loading';

// eslint-disable-next-line no-underscore-dangle
const compose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || origCompose;

// eslint-disable-next-line
const store = createStore(
  (state, action) =&gt; state, // eslint-disable-line
  compose(lazyReducerEnhancer(combineReducers), applyMiddleware(thunk)));

import '../index/index.js';

connectRouter(store);

class AppComponent extends LitElement {
  render() {
    return html`
      <div class="wrapper">
        
        MYROUTES
        <h1>404 Not found</h1>
        
      </div>
    `;
  }
}

customElements.define('eve-app', AppComponent);
github ProjectEvergreen / greenwood / packages / cli / src / templates / app-template.js View on Github external
import { applyMiddleware, createStore, compose as origCompose, combineReducers } from 'redux';
import { lazyReducerEnhancer } from 'pwa-helpers/lazy-reducer-enhancer.js';
import thunk from 'redux-thunk';

// eslint-disable-next-line no-underscore-dangle
const compose = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || origCompose;

// eslint-disable-next-line
const store = createStore(
  (state, action) =&gt; state, // eslint-disable-line
  compose(lazyReducerEnhancer(combineReducers), applyMiddleware(thunk)));

import '../index/index.js';
import './list';

connectRouter(store);

class AppComponent extends LitElement {
  render() {
    return html`
        MYROUTES
        <h1>404 Not found</h1>
    `;
  }
}

customElements.define('eve-app', AppComponent);

lit-redux-router

Declarative way of routing for lit powered by pwa-helpers and redux

MIT
Latest version published 3 months ago

Package Health Score

78 / 100
Full package analysis

Popular lit-redux-router functions