-
-
Save parzibyte/c86128ec9bd72b3c1504cfd428c2bf20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async componentDidMount() { | |
// Obtener ID de URL | |
const idVideojuego = this.props.match.params.id; | |
// Llamar a la API para obtener los detalles | |
const respuesta = await fetch(`${Constantes.RUTA_API}/obtener_videojuego.php?id=${idVideojuego}`); | |
const videojuego = await respuesta.json(); | |
// "refrescar" el formulario | |
this.setState({ | |
videojuego: videojuego, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment