diff --git a/src/App.js b/src/App.js index c3b673e..0a5cc5f 100644 --- a/src/App.js +++ b/src/App.js @@ -13,9 +13,7 @@ const App = () => { useEffect(() => { const savedNotes = JSON.parse(localStorage.getItem("react-notes-app-data")); - if (savedNotes) { - setNotes(savedNotes); - } + savedNotes && setNotes(savedNotes); }, []); // empty array runs only on first load useEffect(() => {