Created
December 17, 2019 12:05
-
-
Save indreklasn/22c486531a91a6efc328d961ffa105da to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import React, { useEffect, useState } from 'react'; | |
import './App.css'; | |
import { getAllNotes, deleteNote, editNote } from './api' | |
import { NoteList, NoteForm } from './components' | |
function App() { | |
const [notes, setNotes] = useState([]) | |
useEffect(() => { | |
getAllNotes.then(res => setNotes(res)) | |
}, []) | |
return ( | |
<div className="App"> | |
<header className="App-container"> | |
<div className="notes-container"> | |
<NoteForm notes={notes} setNotes={setNotes} /> | |
</div> | |
</header> | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment