Created
December 19, 2018 13:08
-
-
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
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
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