difference between class and functional components