Closed atherdon closed 6 years ago
There are 2 types of React Components: Class based component (like a class) and Functional component (like a function).
I have one question: In Header.js (for example), when this import is used? import React from 'react';
Thanks.
Found 😄 whenever I use JSX, I need React to be in scope. Thanks.
move to the next chapter
In Header.js (for example), when this import is used? import React from 'react'; Just try to remove it and you'll see :) @nioperas06
https://medium.com/quick-code/lets-learn-react-chapter-4-functional-x-class-based-component-227f89ea2192
1