index. js:1 Warning: Functions are not valid as a React child. This may happen if you return a Component instead of < Component /> from render. Or maybe you meant to call this function rather than return it.
reason:
1. When you return a component, you mistakenly write it as component instead of <Component/>
2. Maybe you want to call this function instead of return it.
For example:
① When calling a method, forget to add the following parentheses.
② When using react-router version 6.0.2 (released in 20211110), the writing method has been changed when registering the route.
Read More:
- [Solved] React Error: ReactDOM.render is no longer supported in React 18.
- [Solved] react-router-dom Error: <NavLink>activeClassName
- [Solved] React Dependency Error: Invalid tag name “^np.0.2“ of package “react@^np.0.2“: Tags may not have an
- [Solved] React Invariant Violation: Minified React error #130
- React project is packaged and set as required Error [How to Solve]
- React Error: history is undefined [How to Solve]
- JS async await Error: Uncaught SyntaxError: await is only valid in async functions and the top level bodies of modules
- [Solved] vite2+vue3 jsx Error: React is not defined
- [Solved] react-quill failed to install error: Could not resolve dependency
- React error boundary (What You Should Know & How to Solve)
- [Solved] Error:Plugin/Preset files are not allowed to export objects, only functions
- [Solved] React Click the Event to Modify the State Value Error
- [Solved] React Startup Error at the First time :SyntaxError: Unexpected token
- React: How to Solve Web3 import error
- How to Solve React devtools plug-in Error
- [Solved] Error:The above error occurred in one of your React components & A component suspended while respondi
- How to React page to achieve entry and exit animation
- [Solved] Failed to execute ‘getRangeAt‘ on ‘Selection‘: 0 is not a valid index.“
- [Solved] Failed to load config “react-app“ to extend from.
- Anti card limited Drag Based on react draggable drag