Hello everyone, they stopped displaying elements in react in my browser, in the console it shows a bunch of errors, here is an example of them,
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
logCapturedError@react-dom.development.js:18687
update.callback@react-dom.development.js:18720
13923
commitUpdateQueue @ react-dom.development.js:13944
commitLayoutEffectOnFiber @ react-dom.development.js:23391
commitLayoutMountEffects_complete @ react-dom.development.js:24688
commitLayoutEffects_begin @ react-dom.development.js:24674 commitLayoutEffects @ react-dom.development.js:24612
commitRootImpl @ react-dom.development.js:26823
commitRoot@react-dom.development.js:26682
finishConcurrentRender @ react-dom.development.js:25892
performConcurrentWorkOnRoot @ react-dom.development.js:25809
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533
react-dom.development.js:28439 Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. 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 App.
at createFiberFromTypeAndProps (react-dom.development.js:28439:1)
I am learning React as well so not sure what the problem is.
Did you check this part of the error
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. 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 App.
Я не понимаю как добавлять свой файл в на эти площадки для меня это сложно.объяснить не кто не может,по этому мне проще файл отправить на прямую,чем усложнять этот процесс.
Well, as a programmer, you will absolutely have to learn github. When I look on youtube, I see what look like discussions of git and github in Russian. And we’re just asking for the most basic level - you need to create an account, create a repo, and add/commit/push your code. With that, you can provide a link to the repo and we can see exactly what your code is.
At the very least, in your App.js, I would console.log(Clicker) and see what you get. I suspect it will be undefined. As lasjorg pointed out, you seem to be importing from the wrong file. I suspect you meant to import that from ‘./components/clicker.js’. (Though, I would expect that to be in the clicker folder and I would expect the folder name and both file names to be PascalCase.)
I have a github account, but I don’t know how to add a file and where to get a link, on YouTube I don’t understand what they say there, because they don’t answer questions.
this is what the console shows
Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools
bootstrap:27 Uncaught TypeError: Cannot set properties of undefined (setting ‘props’)
at Component (react.development.js:313:1)
at ./src/components/app/App.js (App.js:5:1)
at options.factory (react refresh:6:1)
at webpack_require (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./src/index.js (person.js:32:1)
at options.factory (react refresh:6:1)
at webpack_require (bootstrap:24:1)
at startup:7:1
at startup:7:1
This is getting very frustrating because you don’t seem to be able to follow simple requests. You were asked to not share pictures of code - you did it again. I suggested to you:
At the very least, in your App.js, I would console.log(Clicker) and see what you get.
Have you done that?
I suggested:
I suspect you meant to import that from ‘./components/clicker.js’.
Have you tried that?
As to github:
I have a github account, but I don’t know how to add a file and where to get a link, on YouTube I don’t understand what they say there, because they don’t answer questions.
The link is just the url to the repo. Adding a file… First you have to create a repo - I have a “+” sign on the right of the menu bar. When I click on that, the first option is “New repository”. It will walk you through the steps.
You’re going to have to figure that out. Most of the time, as a developer, there is no one there to “answer question”. Most of the time, you have to do a lot of searching and reading and figuring stuff out.
Others have already gave you good pointers to follow and eventually solve your issue, but just in case it is yet unclear: check the component you import Clicker. Is it imported/exported correctly? Is it a valid react component???
Once you answer those questions, you will likely know what the issue is