💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
React.createElement: type is invalid -- expected a string ``` react.development.js:312 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `Selection`. in Selection printWarning @ react.development.js:312 error @ react.development.js:284 createElementWithValidation @ react.development.js:1757 render @ index.jsx:130 finishClassComponent @ react-dom.development.js:2768 updateClassComponent @ react-dom.development.js:2760 beginWork @ react-dom.development.js:3049 beginWork$1 @ react-dom.development.js:3925 performUnitOfWork @ react-dom.development.js:3734 workLoopSync @ react-dom.development.js:3730 performSyncWorkOnRoot @ react-dom.development.js:3665 scheduleUpdateOnFiber @ react-dom.development.js:3512 updateContainer @ react-dom.development.js:4087 eval @ react-dom.development.js:4117 unbatchedUpdates @ react-dom.development.js:3687 legacyRenderSubtreeIntoContainer @ react-dom.development.js:4117 render @ react-dom.development.js:4119 eval @ main.js:13 ./src/main.js @ main.js:189 __webpack_require__ @ main.js:80 checkDeferredModules @ main.js:46 webpackJsonpCallback @ main.js:33 (anonymous) @ vendor.js:1 react-dom.development.js:4051 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `Selection`. at createFiberFromTypeAndProps (react-dom.development.js:4051) at createFiberFromElement (react-dom.development.js:4051) at createChild (react-dom.development.js:2353) at reconcileChildrenArray (react-dom.development.js:2391) at reconcileChildFibers (react-dom.development.js:2456) at reconcileChildren (react-dom.development.js:2676) at updateHostComponent (react-dom.development.js:2801) at beginWork (react-dom.development.js:3049) at HTMLUnknownElement.callCallback (react-dom.development.js:70) at Object.invokeGuardedCallbackDev (react-dom.development.js:90) createFiberFromTypeAndProps @ react-dom.development.js:4051 createFiberFromElement @ react-dom.development.js:4051 createChild @ react-dom.development.js:2353 reconcileChildrenArray @ react-dom.development.js:2391 reconcileChildFibers @ react-dom.development.js:2456 reconcileChildren @ react-dom.development.js:2676 updateHostComponent @ react-dom.development.js:2801 beginWork @ react-dom.development.js:3049 callCallback @ react-dom.development.js:70 invokeGuardedCallbackDev @ react-dom.development.js:90 invokeGuardedCallback @ react-dom.development.js:105 beginWork$1 @ react-dom.development.js:3934 performUnitOfWork @ react-dom.development.js:3734 workLoopSync @ react-dom.development.js:3730 performSyncWorkOnRoot @ react-dom.development.js:3665 scheduleUpdateOnFiber @ react-dom.development.js:3512 updateContainer @ react-dom.development.js:4087 eval @ react-dom.development.js:4117 unbatchedUpdates @ react-dom.development.js:3687 legacyRenderSubtreeIntoContainer @ react-dom.development.js:4117 render @ react-dom.development.js:4119 eval @ main.js:13 ./src/main.js @ main.js:189 __webpack_require__ @ main.js:80 checkDeferredModules @ main.js:46 webpackJsonpCallback @ main.js:33 (anonymous) @ vendor.js:1 react-dom.development.js:21 Warning: React does not recognize the `classNam` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `classnam` instead. If you accidentally passed it from a parent component, remove it from the DOM element. in div (created by Selection) in div (created by Selection) in Selection printWarning @ react-dom.development.js:21 error @ react-dom.development.js:15 validateProperty$1 @ react-dom.development.js:1060 warnUnknownProperties @ react-dom.development.js:1064 validateProperties$2 @ react-dom.development.js:1064 validatePropertiesInDevelopment @ react-dom.development.js:1074 setInitialProperties @ react-dom.development.js:1134 finalizeInitialChildren @ react-dom.development.js:1370 completeWork @ react-dom.development.js:3110 completeUnitOfWork @ react-dom.development.js:3741 performUnitOfWork @ react-dom.development.js:3735 workLoopSync @ react-dom.development.js:3730 performSyncWorkOnRoot @ react-dom.development.js:3665 scheduleUpdateOnFiber @ react-dom.development.js:3512 updateContainer @ react-dom.development.js:4087 eval @ react-dom.development.js:4117 unbatchedUpdates @ react-dom.development.js:3687 legacyRenderSubtreeIntoContainer @ react-dom.development.js:4117 render @ react-dom.development.js:4119 eval @ main.js:13 ./src/main.js @ main.js:189 __webpack_require__ @ main.js:80 checkDeferredModules @ main.js:46 webpackJsonpCallback @ main.js:33 (anonymous) @ vendor.js:1 react-dom.development.js:21 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder. Please update the following components: Grid, Header, SelectionCheckbox, SelectionCheckboxAll printWarning @ react-dom.development.js:21 warn @ react-dom.development.js:15 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings @ react-dom.development.js:2124 flushRenderPhaseStrictModeWarningsInDEV @ react-dom.development.js:3917 commitRootImpl @ react-dom.development.js:3790 unstable_runWithPriority @ scheduler.development.js:656 runWithPriority$1 @ react-dom.development.js:2076 commitRoot @ react-dom.development.js:3784 finishSyncRender @ react-dom.development.js:3671 performSyncWorkOnRoot @ react-dom.development.js:3668 scheduleUpdateOnFiber @ react-dom.development.js:3512 updateContainer @ react-dom.development.js:4087 eval @ react-dom.development.js:4117 unbatchedUpdates @ react-dom.development.js:3687 legacyRenderSubtreeIntoContainer @ react-dom.development.js:4117 render @ react-dom.development.js:4119 eval @ main.js:13 ./src/main.js @ main.js:189 __webpack_require__ @ main.js:80 checkDeferredModules @ main.js:46 webpackJsonpCallback @ main.js:33 (anonymous) @ vendor.js:1 react-dom.development.js:3239 The above error occurred in the <div> component: in div (created by Selection) in div (created by Selection) in Selection Consider adding an error boundary to your tree to customize error handling behavior. Visit https://fb.me/react-error-boundaries to learn more about error boundaries. logCapturedError @ react-dom.development.js:3239 logError @ react-dom.development.js:3240 update.callback @ react-dom.development.js:3367 callCallback @ react-dom.development.js:2245 commitUpdateQueue @ react-dom.development.js:2246 commitLifeCycles @ react-dom.development.js:3267 commitLayoutEffects @ react-dom.development.js:3866 callCallback @ react-dom.development.js:70 invokeGuardedCallbackDev @ react-dom.development.js:90 invokeGuardedCallback @ react-dom.development.js:105 commitRootImpl @ react-dom.development.js:3821 unstable_runWithPriority @ scheduler.development.js:656 runWithPriority$1 @ react-dom.development.js:2076 commitRoot @ react-dom.development.js:3784 finishSyncRender @ react-dom.development.js:3671 performSyncWorkOnRoot @ react-dom.development.js:3668 scheduleUpdateOnFiber @ react-dom.development.js:3512 updateContainer @ react-dom.development.js:4087 eval @ react-dom.development.js:4117 unbatchedUpdates @ react-dom.development.js:3687 legacyRenderSubtreeIntoContainer @ react-dom.development.js:4117 render @ react-dom.development.js:4119 eval @ main.js:13 ./src/main.js @ main.js:189 __webpack_require__ @ main.js:80 checkDeferredModules @ main.js:46 webpackJsonpCallback @ main.js:33 (anonymous) @ vendor.js:1 react-dom.development.js:4051 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `Selection`. at createFiberFromTypeAndProps (react-dom.development.js:4051) at createFiberFromElement (react-dom.development.js:4051) at createChild (react-dom.development.js:2353) at reconcileChildrenArray (react-dom.development.js:2391) at reconcileChildFibers (react-dom.development.js:2456) at reconcileChildren (react-dom.development.js:2676) at updateHostComponent (react-dom.development.js:2801) at beginWork (react-dom.development.js:3049) at HTMLUnknownElement.callCallback (react-dom.development.js:70) at Object.invokeGuardedCallbackDev (react-dom.development.js:90) ``` ``` 错误的 import { Grid, Notify, NoticeBar } from "zent"; ``` ``` ~~~jsx import { Alert } from 'zent'; ReactDOM.render( <div className="zent-alert-example"> <Alert> <span>通知提示文案</span> <a href="javascript:;" className="zent-alert-demo-text"> 文字链接 </a> </Alert> <Alert title="基础用法" description="通知提示文案" /> </div>, mountNode ); ~~~ ```