Why import React from “react” in a functional component?

When I first started working with React, I always had this confusion that even though my functional component has no reference to React(since I could not see any mention of React keyword in the component), then why do I need to have import React from “react”; at the top of my file. ?…

Source: https://medium.com/@VivekNayyar/why-import-react-from-react-in-a-functional-component-657aed821f7a

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.