Capgemini interview question

How to create the class component and function component?