How to pass data to React components

Kristijan
2 min readMay 10, 2020

Passing data to child components is something we often do in React. It is part of it and helps us to organize our code better. In this post, I am covering how to use them in both functional and class components.

React logo

Passing props

No matter what type of component you use, sending props is always the same. We are using components XML tags, and props as its attributes.

--

--