Skip to content

Instantly share code, notes, and snippets.

@leocristofani
Created December 19, 2018 13:08
Show Gist options
  • Save leocristofani/8cec9ad6d4fb8685a09ee26c21e9b6ff to your computer and use it in GitHub Desktop.
Save leocristofani/8cec9ad6d4fb8685a09ee26c21e9b6ff to your computer and use it in GitHub Desktop.
Micro-frontends in practice - passing authentication token to embedded micro-frontends from parent
import React from 'react';
import MicroFrontends from './microfrontends';
import './app.css';
export default function App() {
return (
<div className="app">
<header className="app__header">
<h1 className="app__logo">Mi<strong>Songs</strong></h1>
</header>
<div className="app__main">
<div className="app__main__column">
<div className="microfrontend__wrapper">
<MicroFrontends.Artists authToken="" basename="" />
</div>
</div>
<div className="app__main__column">
<div className="microfrontend__wrapper">
<MicroFrontends.Playlist authToken="" basename="" />
</div>
<div className="microfrontend__wrapper">
<MicroFrontends.Songs authToken="" basename="" />
</div>
</div>
</div>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment