Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Recoil with Jotai for global state management #372

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

jbouder
Copy link
Collaborator

@jbouder jbouder commented Dec 17, 2024

Fixes #371

Replace Recoil with Jotai for global state management.

  • Update package.json to list jotai as a dependency and remove recoil.
  • Update README.md to mention Jotai as the state management tool instead of Recoil.
  • Replace RecoilRoot with Provider from Jotai in App root and multiple test files.
  • Replace atom with atom from Jotai in src/store.ts and update the import statement.
  • Replace useRecoilState with useAtom from Jotai in src/hooks/use-auth.ts and update the import statement.

For more details, open the Copilot Workspace session.

jbouder and others added 3 commits December 17, 2024 06:50
Fixes #371

Replace Recoil with Jotai for global state management.

* Update `package.json` to list `jotai` as a dependency and remove `recoil`.
* Update `README.md` to mention Jotai as the state management tool instead of Recoil.
* Replace `RecoilRoot` with `Provider` from Jotai in multiple test files such as `src/components/header/header.test.tsx`, `src/components/protected-route/protected-route.test.tsx`, `src/hooks/use-auth-sso.test.tsx`, `src/hooks/use-auth.test.tsx`, `src/main.tsx`, `src/pages/dashboard/dashboard-bar-chart/dashboard-bar-chart.test.tsx`, `src/pages/dashboard/dashboard-pie-chart/dashboard-pie-chart.test.tsx`, `src/pages/dashboard/dashboard-table/dashboard-table.test.tsx`, `src/pages/dashboard/dashboard.test.tsx`, `src/pages/details/details.test.tsx`, `src/pages/home/home.test.tsx`, `src/pages/search-results/search-results.test.tsx`, and `src/pages/sign-in/sign-in.test.tsx`.
* Update import statements for `Provider` from Jotai in the above-mentioned files.
* Replace `atom` with `atom` from Jotai in `src/store.ts` and update the import statement.
* Replace `useRecoilState` with `useAtom` from Jotai in `src/hooks/use-auth.ts` and update the import statement.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/MetroStar/comet-starter/issues/371?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link
Collaborator

@kildre kildre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jbouder jbouder merged commit 605dfe0 into main Dec 17, 2024
6 checks passed
@jbouder jbouder deleted the jbouder/replace-recoil-with-jotai branch December 17, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace Recoil with Jotai for Global State Management
2 participants