Created
March 20, 2023 14:42
-
-
Save ozgurozkok/d830101be2fd97c1bd62af686b56845e to your computer and use it in GitHub Desktop.
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
//file 1 | |
import React from 'react'; | |
function MyMicrofrontend() { | |
return ( | |
<div> | |
<h1>Welcome to my micro frontend!</h1> | |
<p>This is a simple micro frontend implemented with ReactJS.</p> | |
</div> | |
); | |
} | |
function MyApp() { | |
return ( | |
<div> | |
<h1>Welcome to my host application!</h1> | |
<p>This is the host application that will integrate our micro frontend.</p> | |
<hr /> | |
<MyMicrofrontend /> | |
</div> | |
); | |
} | |
export default MyApp; | |
//file 2 | |
import React from 'react'; | |
import MyApp from './MyApp'; | |
function App() { | |
return ( | |
<div> | |
<MyApp /> | |
</div> | |
); | |
} | |
export default App; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment