Skip to content

Instantly share code, notes, and snippets.

@erasmo-marin
Created August 25, 2017 14:52
Show Gist options
  • Save erasmo-marin/62365d39c265c5d5d152e1c60c51adda to your computer and use it in GitHub Desktop.
Save erasmo-marin/62365d39c265c5d5d152e1c60c51adda to your computer and use it in GitHub Desktop.
Registry example
import Registry from "./registry";
//avoid to import component using named imports, instead import directly from the file to reduce bundle size
import Component1 from "./component1";
import Component2 from "./component2";
import Component3 from "./component3";
const registry = new Registry({
components: {
"component-1": Component1,
"component-2": Component2,
"component-3": Component3
}
});
export default registry;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment