The idea is to ensure that the component can be used in as many scenarios as possible. React basic 4 — Class Based Component and Lifecycle Methods. The first approach is called an uncontrolled component because React is not setting the value. If you don’t like to use for and id, you could wrap the input element with the label. Coyier and a team of swell people. Another property could be the label showing up for the button: We can also use React's built-in children property which is commonly used for composition in React: The Button component is almost a 100% generic by offering an API to the outside. There is one root component which kicks of the rendering for all the other components below. In HTML, form elements such as ,