Skip to content

Instantly share code, notes, and snippets.

@ozgurozkok
Created March 20, 2023 14:42
Show Gist options
  • Save ozgurozkok/d830101be2fd97c1bd62af686b56845e to your computer and use it in GitHub Desktop.
Save ozgurozkok/d830101be2fd97c1bd62af686b56845e to your computer and use it in GitHub Desktop.
//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