equinor / equinor/fusion-framework

bookmark: use fast-deep-equal to compare bookmarks in reducer

Open Beginner friendly
#5,135 4 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.