Front-end BUCKET LIST application built with REACT. Users can add, update or delete items from a bucket list - which persists when they refresh or revisit the page. Uses STATE, HOOKS, COMPONENTS, PROPS, conditional rendering, forms and event handling. Built from starter code.
There are currently two functions in BucketList.js which are used to check if there is existing user bucket list data stored in localStorage, or to give a set of default values if there is not. They are required in order to render the page / fetch user data.
They are currently part of the BucketList.js file but I think they might be better as a module:
[ ] Easier to unit test
Also want to:
[ ] Review bootcamp exercises to see standard practice for fetching data / data fetching functions
[ ] See what directory to store the functions under
Also I think in line with object oriented programming principles, I might want to separate the 'check/fetch' function into two separate functions; each function to do one thing; this function both checks whether there is a truthy localStorage object AND fetches the data from it if there is.
There are currently two functions in
BucketList.js
which are used to check if there is existing user bucket list data stored inlocalStorage
, or to give a set of default values if there is not. They are required in order to render the page / fetch user data.They are currently part of the BucketList.js file but I think they might be better as a module:
Also want to:
Also I think in line with object oriented programming principles, I might want to separate the 'check/fetch' function into two separate functions; each function to do one thing; this function both checks whether there is a truthy localStorage object AND fetches the data from it if there is.