react deconstruct props functional component

In step 3: In this step we will return the JSX template, which we need to be appeared in the DOM. Otherwise react doesn’t know the excistence of the newly created component. But unlike class components (which are ES6 classes), functional components cannot have constructor() or naturally inherit props from the parent components. I’d heard a lot of great things about the improvements but at the same time, I’d just gotten used to the good ol’ original way of doing things and here was a new syntax thrown at me to learn. We use it as a callback function to the click event of a

Leave a Reply

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