DEV Community

john
john

Posted on

What is React must be in scope??

what is the use of import React from 'react'

Every React component is compiled into React.createElement('tagName',{props},value)
if React is not imported then it will show an error 'React must be in scope'

Top comments (1)

Collapse
 
johnbabu021 profile image
john

Sorry i forget to mention about Eslint
Thanks for the comment