Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PROJECT CONTRIBUTIONS ARE ALLOWED AND WELCOMED. Follow the guidelines as outlined below!
Using Firebase Firestore to add, delete and edit todo list data.
Description
First of all a new component was created called Todo. The update and delete functionality were added in the Todo
component. For the add functionality, a reference was made to the database collection root "todos" then the add function
was applied. Within the add fucntion the usestate var was called (title) and the field was given the name as "title".
SetTitle was called empty to as to set the field empty when adding new task.
To get the data from firebase firestore, onSnapshot and querySnapshot was referenced. Also Id was set within get data as to
get or set data from a particular field. UseEffect was also implemented to called get data when the page has started. For the
delete function title and id props were added, then the database referenced the root which reference the id which called the delete.
In the update function a new usestate was created then the update function was called selecting the title field and linking it to
the new usestate variable created.
Other features were the localStorage was removed and data displayed in list as a paragraph.
Related Issue / Asana Task
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):