How do I create a method in a functional component?
You can create your methods in your component's function definition however you like (function definition, assignment to a variable, etc.). We no longer need the this keyword in a functional component. There is no class instance, so we don't refer to our state, props, or methods as members of the class. Let's continue with the previous example.