Pass Props to Children in React

Anyone who is learning know that components are the main characters in React. It’s also true that thinking in components is a remarkable skill, maybe, sooner or later, i’ll try to write an article about that.

Let’s start from the beginning: what is a Component? A component is a special type in React (but also in Angular, Vue.js, …), a mix between JavaScript and HTML ‘n’ DOM. Imagine it as an atom, “the smallest matter in the universe” (but also not). If we combine more atoms we’ll get a molecule, an so on. Components let us split our app or website into reusable pieces. Conceptually they’re like JavaScript function, they’ll return a value and accept parameters, the latter are Props (propositions).

Continue reading “Pass Props to Children in React”