Really Good Explanation. Just wanted to add that starting from React 17 they have added support for the new JSX-transform. So if you remove the import React from 'react' statement for any functional component that returns even jsx (and not simple JS primitives), it will not throw the old Uncaught ReferenceError: React is not defined error. You can read more about it here: reactjs.org/blog/2020/09/22/introd...
import React from 'react'
Uncaught ReferenceError: React is not defined
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Really Good Explanation.
Just wanted to add that starting from React 17 they have added support for the new JSX-transform. So if you remove the
import React from 'react'
statement for any functional component that returns even jsx (and not simple JS primitives), it will not throw the old
Uncaught ReferenceError: React is not defined
error.
You can read more about it here: reactjs.org/blog/2020/09/22/introd...