Open GabrielJDavila opened 2 weeks ago
Some notes:
Notes: Local storage definitely is faster, but a problem is that the same data persists even if I change dates. I need to add a date property to the data. Or, I could: initially save workout data to firestore when user is picking their exercises. When that data is initially pulled from firestore, save it to localStorage. Modify that data in localStorage (sets/Reps, notes, etc.) When the user finally saves the workout, then the data is sent back to firestore. If the user adds a new exercise, check to see if the localStorage item exists; if it does, then add the exercise. If it doesn't, add it to firestore first to initalize a new workout.
I'm having too many read and writes to firestore in a given workout. I think the best way to optimize this is: