Uploaded image for project: 'Evergreen'
  1. Evergreen
  2. EVG-15458

Refactor state managment in useNotificationModal hook

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: next_quarter
    • Component/s: ui
    • Labels:

      Description

      https://github.com/evergreen-ci/spruce/blob/main/src/hooks/useNotificationModal.ts

      We would benefit but by simplifying the state management in this hook.

      There are allot of complicated state transitions and side effects that can be greatly simplified by refactoring the state management into a useReducer. 

      It would make this hook easier to understand and easier to expand in the future. 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-evg Backlog - Evergreen Team
              Reporter:
              mohamed.khelif Mohamed Khelif
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: