How to use generics in props in React in a functional component?

Posted by Jessica Taylor | Updated on

Want to use generics in props in React in a functional component? You can however skip the type annotation, and make the function generic and type props explicitly.

Here is an example:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers