{"size": 1169, "ext": "js", "max_stars_repo_path": "aula/src/App.js", "max_stars_repo_name": "andersonjoliveira/React-JS", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "aula/src/App.js", "max_issues_repo_name": "andersonjoliveira/React-JS", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "aula/src/App.js", "max_forks_repo_name": "andersonjoliveira/React-JS", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.447761194, "max_line_length": 70, "alphanum_fraction": 0.5106928999}
import Routes from './routes';

export default function App(){
  return(
      <Routes/>      
  );
}




/* 53. Requisições HTTP

import React, { useEffect, useState } from 'react';
import './style.css';

////https://sujeitoprogramador.com/rn-api/?api=posts

function App() {

  const [nutri, setNutri] = useState([]);

  useEffect(()=>{

    function loadApi(){
      let url = 'https://sujeitoprogramador.com/rn-api/?api=posts';
      
      fetch(url)
      .then((r)=> r.json())
      .then((json)=> {
        console.log(json);
        setNutri(json);
      })
    }

    loadApi();

  }, []);

  return (
    <div className="container">
      <header>
        <strong>React Nutri</strong>
      </header>

      {nutri.map((item)=>{
        return(
          <article key={item.id} className="post">
            <strong className="titulo">{item.titulo}</strong>
            
            <img src={item.capa} alt={item.titulo} className="capa" />
            <p className="subtitulo">
              {item.subtitulo}
            </p>

            <a className="botao">Acessar</a>

          </article>
        )
      })}
    </div>
  );
}

export default App;

*/