For the future of stencil-redux, I suggest to Impement a Decorator named Store, this should only be an adapter. Stencil-redux would use this adapter.
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.
Originally posted by @stanley85 in #70 (comment)