Skip to content

Instantly share code, notes, and snippets.

@FlorianRappl
Created February 27, 2020 14:14
Show Gist options
  • Save FlorianRappl/cd568969a7bbc3452a0d46969a144956 to your computer and use it in GitHub Desktop.
Save FlorianRappl/cd568969a7bbc3452a0d46969a144956 to your computer and use it in GitHub Desktop.
// microfrontend A
document.currentScript.setup = api => {
api.setData('secret', 42);
};
// microfrontend B
document.currentScript.setup = api => {
const value = api.getData('secret'); // 42
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment