Skip to content

Instantly share code, notes, and snippets.

View alaodev's full-sized avatar
🎯
Focusing

André Luiz alaodev

🎯
Focusing
View GitHub Profile
@matheusrod92
matheusrod92 / update-parent-state-react.js
Created November 20, 2018 18:14
Como atualizar estado de um componente pai em react
import React from 'react';
import PropTypes from 'prop-types';
const Filho = (props) => (
<div>
<b>Eu sou um componente stateless</b>
<span> mas eu controlo o state do meu pai!</span>
<input
type="text"
value={props.valorDoPapaizineo}