Skip to content

feat: add state management and mock service worker

Resolves #618 (closed)

Resolves #619 (closed)

Resolves #617 (closed)

Resolves #620 (closed)

This MR improves the global state management by utilizing Redux instead of React Context.

It also aims to replace most of the useEffect hooks used for data fetching with Redux Toolkit Queries. This method of data fetching is much more concise and will add stability to the web app. Minimizing the use of useEffect will prevent many of the bugs we've had in the past. RTK Query also makes refetching, handling loading states, and errors a breeze.

Finally, this MR also adds MSW to stub data from membership API endpoints on dev mode. This will help us not need to make manual data stubs for every single fetch in our app. This means our source code can be written as if we were only targeting prod.

The service worker is only included when the environment is set to DEV. It is not included in production builds.

Edited by Olivier Goulet

Merge request reports

Loading