`Day 77` - Refactored for a timed hour - Begin wor...
# 100daysofkotlin-2021
b
Day 77
• Refactored for a timed hour • Begin working on saving / fetching notes from server & then caching to room database.
Day 78
• Refactored (will be more detailed starting tomorrow) • Continue implementing save / fetch notes in Daily Doc ◦ Added a new way to fetch note(s), however I ended up breaking how I access the current day's note. Working on fixing it.. •

Using Jetpack libraries in Compose | Session

Self-Comment
• Been combining some days together as some of the days I am stuck on implementing a feature or fixing a bug so nothing noteworthy until I've accomplished implementing / fixing it. • An hour spending time looking to refactor moves by quick. I come across a few issues trying to refactor what I intend to, and this might be able to be fixed by planning it out first. Will try this on Day 79-80 to test. • Came across some issues with note caching. I'm sure I accidentally removed something(s) while implementing other features. Not sure where I messed it up. (This is where tests would be helpful 😆) ◦ Current Daily Note is not loading properly. It caches until the app is destroyed. Afterwards if I "edit" the current note, it creates a new note instead of replacing the current. • The YouTube video link offered a lot of clarity! I should have watched this a month ago. Will be helpful in my refactoring & potentially help fix the issue(s) I recently created in my code. • Originally, I thought it would be a good idea to implement various ways to implement features to practice with different methods. However, I've come to realize that when going back to old code it makes it more confusing as the project grows. Lesson partially learned 😉
Goals Tomorrow
Copy code
(My code has been getting out of hand, the hour of refactoring isn't enough. Will focus on cleaning code up for at least day 79 & possibly 80 to make it easier to implement adding / fetching notes from server)

Will work through cleaning up NoteViewModel , UserViewModel, NoteAddViewModel before moving to their respected screens & the NavGraph.
• Focus on refactoring ◦ Single Source of Truth ▪︎ Managing State • State hosting - VM, Screens ▪︎ Lifecycle • Work with this along with State hoisting ▪︎ Navigation ◦