src/SharedStateProvider.js
/**
     * Load any state promises and notify the listeners
     */
Load any state promises and notify the listeners
Load any state promises and notify the listeners
load() {
        for( let p in this.initialPaths ) {
            let value = paths.getPath( p, this.state )
            let setState = ( val ) => {
                paths.putPath( p, this.state, val )
                this.notify( p, val )
            }
            setState.bind( this )
            if( value && typeof value.then === 'function' ) {
                paths.putPath( p, this.state, null )
                value.then( setState )
            } else {
                setState( value )
            }
        }
    }
load ( ) { for ( let p in this . initialPaths ) { let value = paths . getPath ( p , this . state ) let setState = ( val ) => { paths . putPath ( p , this . state , val ) this . notify ( p , val ) } setState . bind ( this ) if ( value && typeof value . then === 'function' ) { paths . putPath ( p , this . state , null ) value . then ( setState ) } else { setState ( value ) } } }
Load any state promises and notify the listeners
Load any state promises and notify the listeners