Five Ways to Write a Functional Component
Functional components are the bread-and-butter of any React application, especially with the addition and expansion of React Hooks. This post breaks down a simple functional component (Version #1) and then shows four additional ways it could be written. Enjoy:
Version #1: ES5 and Props Object
This first version is very simple. It’s a simple function called `Button` that takes an argument, props
.