Created
September 5, 2020 12:31
-
-
Save harshaktg/fd9d0f09dcb11a2445b06ff0150d7fd8 to your computer and use it in GitHub Desktop.
Store MFE Single SPA
This file contains 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
window.myapp = { | |
counter: 0, | |
incrementor: () => { | |
window.myapp.counter += 1; | |
window.dispatchEvent(new Event('onIncrement')); | |
}, | |
decrementor: () => { | |
window.myapp.counter -= 1; | |
window.dispatchEvent(new Event('onDecrement')); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment