Skip to content
Snippets Groups Projects
App.js 810 B
Newer Older
  • Learn to ignore specific revisions
  • import Home from './pages/Home'
    
    Max Ramsay King's avatar
    Max Ramsay King committed
    import './App.css';
    
    Max Ramsay King's avatar
    Max Ramsay King committed
    import React, { useState, useEffect } from "react";
    import axios from "axios";
    
    Max Ramsay King's avatar
    Max Ramsay King committed
    
    
    Max Ramsay King's avatar
    Max Ramsay King committed
    // import {BrowerRouter as Router, Route, Switch} from 'react-router-dom';
    
    
    Max Ramsay King's avatar
    Max Ramsay King committed
    function App() {
    
      // useEffect(() => {
      //   console.log('print here')
      //   fetch('/home', {
      //     method: 'POST',
      //     headers: { 'Content-Type': 'application/json' },
      //     body: JSON.stringify({ })
      //   })
      //     .then((response) => response.text())
      //     .then((data) => console.log('data', data));
      // }, []);
    
      // useEffect(() => {
      //   fetch('/api').then(response =>{
      //     if(response.ok){
      //       return response.json()
      //     }
      //   }).then(data => console.log(data))
      // }, [])
    
    Mia Wang's avatar
    Mia Wang committed
    
      return (
        <div>
    
          <Home />
    
    Mia Wang's avatar
    Mia Wang committed
        </div>
      );
    
    Max Ramsay King's avatar
    Max Ramsay King committed
    }
    
    Max Ramsay King's avatar
    Max Ramsay King committed
    
    export default App;