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

Latest commit

 

History

History
52 lines (41 loc) · 1.59 KB

File metadata and controls

52 lines (41 loc) · 1.59 KB

rescope-spells

Build Status NPM Version contributions welcome

What ?

Work in progress collection of chainable stores decorators for rescope

Examples ?

new Scope(
    {

        @asStore // cast the "myData" object to a Store class named "myData"
        myData : {
         @asRef // bind some scope refs to (myData).state.url
         url    : "appConfig.myMainDataUrl",
         @asRef
         params : "appState"

        }

        @asStore
        appConfig : {
            myMainDataUrl : "http://some.where/{%appState.lang}.json
        }

        @asStore
        appState : {
            lang          : 'fr',
            currentFilter : {
                name : "Par.*"
            }
            someAction(){
               return {
                   some:"mutations"
               }
            }
        }
    },
    {
        // cfg ...
    }
)

HitCount PayPal donate button