20230925
Fell asleep around midnight and woke up around 6:30. Got up, had breakfast and played piano then. Started to work around 8 as usual. I just had a new idea and tried to refactor the redux store, but it was not very successful. I was not satisfied with the implementation because I had to use string path to set and get deeply, dynamically nested object field, which is not type safe. It looked like after 4.1.3, Typescript provided a way to access object property by path safely, but it didn't work well with my redux store. Finally I decided that, I had to flatten to tree structure, convert it to an array of tree nodes, then access them by id (generated from their path). It was already 5 when I finally finished writing functions on flatening and unflatening, so I may do the cycling exercise in the evening. So far completed 17 pomodoreos - one for learning and sixteen for work.
评论
发表评论