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

Discussion on Stencil-Redux future implementation #71

@stanley85

Description

@stanley85

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions