Closed goatandsheep closed 5 years ago
Redux and vaadin router were only included in create-lit-app-advanced
. I think it's unlikely that we'll add redux and the vaadin router in this starter-app, as we're trying to keep entry-level low, however we do plan on making a bigger scale starter-app: https://github.com/open-wc/open-wc/issues/197
I can't assure redux and vaadin router will be included there either though. Fortunately, adding redux and vaadin router don't have to do much with the project configuration. You can add them like so:
npm i redux pwa-helpers @vaadin/router
add a store.js
: https://github.com/thepassle/create-lit-app-advanced/blob/master/src/store.js
and add the router code to your my-app.js
:
import { Router } from '@vaadin/router';
...
firstUpdated(){
const router = new Router(this.shadowRoot.querySelector('#outlet'));
router.setRoutes([
{path: '/', component: 'hello-world'},
{path: '/books', component: 'books-demo'},
{path: '/redux', component: 'redux-demo'},
{path: '(.*)', component: 'not-found'}
]);
}
You can also simply copy the files from https://github.com/thepassle/create-lit-app-advanced as the code has not much to do with the project configuration itself, and should still work if implemented here. Hopefully thats helpful to you :)
That is helpful. Thanks!
If we're deprecating create-lit-app, we need to integrate the features from it, e.g.