DEV Community

Cover image for React: How to Create a Component

React: How to Create a Component

Tim Smith on August 30, 2018

Components are an essential part of any React application. In this post, we'll be learning how to create components to do whatever we want. Think ...
Collapse
 
augustasv profile image
Augustas Verbickas

It should be noted that in React, the return (regardless of component type) can only return one direct element.

-- Tim Smith

Thank you for this reminder! That helped me!

Collapse
 
sutapam38388186 profile image
Sutapa Mondal

well explained and undoubted articles on creating a component in React! worth sharing...

Collapse
 
siddhantk profile image
Siddhant

what should I use class or functional components and why? please explain it.