twildh / quick-start

⚡ Bookmark-based browser start page
MIT License
37 stars 5 forks source link

Avoid unnecessary API calls #2

Open samuelmeuli opened 4 years ago

samuelmeuli commented 4 years ago

For simplicity, the current implementation calls the refreshBookmarks function to update the UI after every modification to the bookmark tree. This obviously isn't very efficient. Instead of calling this function, the flattened bookmark tree (in the Redux store) could be modified directly.

Example:

https://github.com/samuelmeuli/quick-start/blob/4daf1c457e67b9ee68d1ccd965c641e600ea5bba/src/content/store/thunks.ts#L24-L31