Skip to content

tashikomaaa/rex-the-reporter-dog

Repository files navigation

rex-the-reporter-dog

alt text

Config

first off all you need to create a file remote-component.config.jsinside your src/folder

/*eslint-disable*/
module.exports = {
  resolve: {
    react: require("react"),
  },
};

next create a file RemoteComponent.js inside your src/folder

/*eslint-disable*/
import { createRemoteComponent, createRequires } from "rex-the-reporter-dog";
import { resolve } from "./remote-component.config";
const requires = createRequires(resolve);

export const RemoteComponent = createRemoteComponent({ requires });

Use Rex for get your components

Now you can use Rex for going to search your components and give it to you !

The proccess is simple:

  • import the RemoteComponent created before
import { RemoteComponent } from "../../RemoteComponent";
  • then add it to you jsx return:
<RemoteComponent url={uri_of_your_bundle.js} />

And "Voilà" !

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published