equinor / equinor/fusion-framework
bookmark: use fast-deep-equal to compare bookmarks in reducer
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 10
- Avg merge
- 19h 40m
- Merged PRs (30d)
- 150
Description
In `packages/modules/bookmark/src/BookmarkProvider.reducer.ts`, `createBookmarkReducer` has:
```ts
/**
* Creates a reducer for managing the state of bookmarks.
*
* @todo add fast-deep-equal to compare bookmarks
* ...
*/
```
Bookmark comparisons in the reducer should use `fast-deep-equal` (already a dependency elsewhere in the framework) instead of reference/shallow equality, to avoid unnecessary state updates.
Contributor guide
Research direction
Start in packages/modules/bookmark/src/BookmarkProvider.reducer.ts at createBookmarkReducer and inspect how bookmark comparisons currently determine state updates. Use the framework's existing fast-deep-equal dependency for those comparisons, then verify that equivalent bookmark values no longer cause unnecessary updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100