generated from the-collab-lab/smart-shopping-list-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
Week 1: Claudia and Michelle As a component, I want to be able to read from and write to the Firestore database #3
ClaudiaStar edited this page Nov 17, 2019
·
9 revisions
- The following have been added as project dependencies: firebase & react-firestore
- Make a change in the Firestore database and it shows up in the app
- Make a change in the app and it shows up in the Firestore database
- Created a branch, added firebase and react-firestore dependencies, pushed branch to remote repo.
- Agreed to learn about how to set up and use firebase and firestore in react applications and will each set up our own
- Going to meet up again tomorrow at same time and use git to compare each of our set ups. After that we will pair program the last two AC tasks.
- Resources used to write/read from firestore database: ** https://medium.com/get-it-working/get-googles-firestore-working-with-react-c78f198d2364 ** https://react-firebase-js.com/docs/react-firestore-database/getting-started
- We had a hard time finding documentation/tutorials that use react-firestore dependency, but were able to communicate with firestore db without it.
- Able to get react-firestore working (michelle basically forgot how react works so major user error on my part). (Still want to better understand all the parameters for each component in the pkg as well.)
- Now breaking up and working on two components, michelle will get/fetch data from DB and claudia will work on component to add data to DB.
- Link from stacie is super helpful -- https://medium.com/@stacietaylorcima/use-react-hooks-to-send-data-from-react-app-to-firestore-843468577c98
- i need to brush up (aka learn) more about hooks -- https://reactjs.org/docs/hooks-overview.html also just getting a better grasp on firestore - https://firebase.google.com/docs/firestore/quickstart?authuser=0
sincerely, michelle
- Resources: https://medium.com/@stacietaylorcima/use-react-hooks-to-send-data-from-react-app-to-firestore-843468577c98 Officially reading from and writing to firestore db using react-firestore.
- We attempted to test our Firestore DB connection using cypress & cypress-firebase but after much reading we came to the conclusion that we need to create a User UID on Firestore, which would require us to set up a sign-in method for authentication.
- We decided to create simpler Cypress tests that don't require us to change the database setup. The cypress docs were very clear and easy to use: https://www.cypress.io/