UNPKG

lore

Version:

Convention-driven framework for building React-Redux applications

23 lines (20 loc) 626 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = validateReactConfig; /** * Validate the React config, and confirm it has the required methods */ function validateReactConfig(config) { if (!config) { throw new Error('No React config found. You must include the lore-hook-react hook, or create a config/react.js file manually.'); } if (!config.getRootComponent) { throw new Error('React config has no getRootComponent() method.'); } if (!config.mount) { throw new Error('React config has no mount() method.'); } } module.exports = exports['default'];