Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

update stencil/core and fix #69 #70

Closed
wants to merge 2 commits into from

Conversation

stanley85
Copy link

Stencil issue ionic-team/stencil#2015
Redux issue #69

This is the adapted solution, dev build works without error - build script runs without error

@stanley85 stanley85 changed the title update stencil/core and fix #2015 update stencil/core and fix #69 Nov 18, 2019
"description": "Stencil Redux - A simple redux-connector for Stencil-built web components",
"main": "dist/index.js",
"module": "dist/esm/es5/index.js",
"module": "dist/index.mjs",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was suggested by the compiler

@@ -27,7 +27,7 @@
"url": "git+https://github.com/ionic-team/stencil-redux.git"
},
"devDependencies": {
"@stencil/core": "^0.18.0",
"@stencil/core": "^1.8.0",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^1.8.0 is the first release that is failing with #69

@imhoffd
Copy link
Contributor

imhoffd commented Nov 18, 2019

I think more work is necessary. If you inspect the dist/ directory, there are no .js or .mjs files.

I think this library needs to be completely rewritten for Stencil 1. Not only do we need to fix up stuff like this, we need to abandon the legacy context system and recommend a completely new way of using this library.

@stanley85
Copy link
Author

Would be awesome to have a syntax like this as soon as redux is available to a stencil project.

@Store({ name: 'default', action: this.documentChange, type: 'redux' }) document: any = {};

Each member decorated with @Store shares the same store. Action is associated with the redux action. @Store Decorator would inherit behaviour from @State. Name could be the name of the reducer.

Having the type as an optional parameter (default = 'redux') could allow to further define custom stores. Maybe a dynamic store for firebase could allow for a simple change like eg.

@Store({ name: 'default', action: this.documentChange, type: 'firestore' }) document: any = {};

Name could be the name of the database document.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants