I just finished to write my code about ‘Calculator’ using React, then i tried to get the code to work in codepen to test it, but it doesn’t work. I saw the error ‘// [object Error]
{}’. However it doesn’t make sense for me because there is no any other message like line number. I will paste my codepen link below and codesandbox link, which is worked. I would be appreciate your helps.
Hey. If you are using chrome, you can simply inspect the page, and you will have the actual error message in the chrome console. In your case it’s “ReferenceError: useState is not defined”.
Thank you for your reply. I inserted the line you gave, then it works!
I didnt know that “react”(module) and “React”(object) are different. Thank you so much.