Skip to content

Instantly share code, notes, and snippets.

Created December 21, 2020 22:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
import React from 'react';
import Constantes from "./Constantes";
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import FilaDeTablaDeVideojuego from './FilaDeTablaDeVideojuego';
class VerVideojuegos extends React.Component {
constructor(props) {
this.state = {
videojuegos: [],
async componentDidMount() {
const respuesta = await fetch(`${Constantes.RUTA_API}`);
const videojuegos = await respuesta.json();
videojuegos: videojuegos,
render() {
return (
<div className="column">
<h1 className="is-size-3">Ver videojuegos</h1>
<div className="table-container">
<table className="table is-fullwidth is-bordered">
{ => {
return <FilaDeTablaDeVideojuego key={videojuego._id} videojuego={videojuego}></FilaDeTablaDeVideojuego>;
export default VerVideojuegos;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment