Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 761 Bytes

File metadata and controls

17 lines (10 loc) · 761 Bytes

Create a custom hook that allows saving items to the local storage

You will start from an existing Todo List app built with React. It works great - users can add / remove items - but there is only one problem - every time the page is refreshed, all the items are lost.

Your task will be to implement persistence - the list of tasks should be saved to local storage, so that the user can continue where they left off after closing and reopening the browser window.

Clone this repo to get started!

Implementation notes:

  • Use a custom hook to encapsulate the saving to local storage logic

Getting started with this repo

  • Run npm install before you get started.
  • Add your code to the src/use-local-storage.js file.
  • Run the app with npm start