How to use the react-cosmos-utils/lib/import-module function in react-cosmos-utils

To help you get started, we’ve selected a few react-cosmos-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-cosmos / react-cosmos / packages / react-cosmos / src / load-modules.js View on Github external
Object.keys(components).forEach(name => {
    const component = importModule(components[name], name);

    if (!component || !isReactComponent(component)) {
      console.warn(`'${name}' is not a valid React component`);
    } else {
      result[name] = component;
    }
  });
github react-cosmos / react-cosmos / packages / react-cosmos / src / load-modules.js View on Github external
Object.keys(componentFixtures).forEach(name => {
      componentResult[name] = importModule(componentFixtures[name], name);
    });

react-cosmos-utils

Libs shared between React Cosmos modules

MIT
Latest version published 7 years ago

Package Health Score

67 / 100
Full package analysis

Similar packages