-
-
Save parzibyte/b6a864d288c5c9a42195ec180af78b2b 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}/${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