What is the Responsive Responsive feature?
When you write a component with state, it has these three main parts (except for the whole logic):
1. constructor
2. life cycle methods
3. make
And try converting this part of the rendering to:
React.createElement(element, null);
Now, when you write a stateless functional component, basically it only has a render constructor without a constructor, without a lifecycle method . Regardless of the fact that you return from this component is also converted to:
React.createElement(element, null);
So what is React importing for? Always keep in mind that we are writing JSX not the html that will be passed to babel .
Check the DOC for a non-JSX response .
Check out the converted version of the functional component from Babel.
Hope this helps you.
source share