-
-
Save yarastqt/ad584544adedbd8d1376a7b5d569b569 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SharedStore { | |
hydrate(ctx) { | |
this.data = ctx.data | |
} | |
} | |
const $sharedStore = new SharedStore() | |
class FeatureStore { | |
data = $sharedStore.data | |
hydrate(ctx) { | |
$sharedStore.hydrate(ctx) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead this approach we can use separate store into view:
Because I guess derived store is not better solution.