Skip to content

Instantly share code, notes, and snippets.

@indreklasn
Created December 17, 2019 10:57
Show Gist options
  • Save indreklasn/203653266bd40cc3fe369af25d79721c to your computer and use it in GitHub Desktop.
Save indreklasn/203653266bd40cc3fe369af25d79721c to your computer and use it in GitHub Desktop.
import React, { useEffect, useState } from 'react';
import './App.css';
import { getAllNotes, deleteNote, editNote } from './api'
function App( ) {
const [notes, setNotes] = useState([])
useEffect(() => {
getAllNotes.then(res => setNotes(res))
}, [])
return (
<div className="App">
<ToastContainer />
<header className="App-container">
<div className="notes-container">
</div>
</header>
</div>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment