MCPcopy Index your code
hub / github.com/entria/react-app-loader

github.com/entria/react-app-loader @v0.1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.3 ↗ · + Follow
14 symbols 34 edges 9 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

react-app-loader github

Production ready library for handling Microfrontends.

Demo and Example

Preview

How to use

Create a config file for each external app:

$ touch AnyExternalApp.js

Then, wrap it with withAppLoader HOC:

// @flow

import withAppLoader from '@entria/react-app-loader';

const elementId = 'github';
const appUrl = 'https://github.com/';

const AppLoader = withAppLoader({ elementId, appUrl });

export default AppLoader;

Or you can try a more complex way, passing some props:

// @flow

import React from 'react';
import withAppLoader from '@entria/react-app-loader';

const elementId = 'github';
const appUrl = 'https://github.com/';

type Props = {
  externalUrl: string,
};

const AnyExternalApp = (props: Props) => {
  const { externalUrl } = props;
  const AppLoader = withAppLoader({
    elementId,
    appUrl: externalUrl != null && externalUrl.length > 0 ? externalUrl : appUrl
  });
  return <AppLoader />;
};

export default AnyExternalApp;

Import it on your React app:

import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';

import AnyExternalApp from './AnyExternalApp';

class App extends Component {
  render() {
    return (



        <AnyExternalApp />



    );
  }
}

export default App;

Import babel-polyfill on your index.js

import 'babel-polyfill';

Run \o/

License

MIT

Core symbols most depended-on inside this repo

registerValidSW
called by 2
example/my-awesome-app/src/registerServiceWorker.js
render
called by 2
example/my-awesome-app/src/App.js
checkValidServiceWorker
called by 1
example/my-awesome-app/src/registerServiceWorker.js
withAppLoader
called by 1
src/withAppLoader.js
register
called by 0
example/my-awesome-app/src/registerServiceWorker.js
unregister
called by 0
example/my-awesome-app/src/registerServiceWorker.js
AnyExternalApp
called by 0
example/my-awesome-app/src/externals/AnyExternalApp.js
componentDidMount
called by 0
src/withAppLoader.js

Shape

Function 7
Class 4
Method 3

Languages

TypeScript100%

Modules by API surface

src/withAppLoader.js5 symbols
example/my-awesome-app/src/registerServiceWorker.js4 symbols
example/my-awesome-app/src/App.js3 symbols
src/loadPageIntoElement.js1 symbols
example/my-awesome-app/src/externals/AnyExternalApp.js1 symbols

For agents

$ claude mcp add react-app-loader \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact