Skip to content

[Issue 143] Refactor /resources page to use React Query #147

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

Closed
wants to merge 3 commits into from

Conversation

lpatmo
Copy link
Member

@lpatmo lpatmo commented Sep 5, 2020

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 🎨 Enhancement
  • 📝 Documentation Update
  • 🔖 Release
  • 🚩 Other

Context

Paired with @peoray to refactor the /resources page to use React Query (https://react-query.tanstack.com/docs/guides/queries#query-keys)

Screenshots/Recordings (if there are UI changes)

No UI changes!
image

Implementation Details - what was your thought process as you changed the code?

[x] Added a getResources function to utils/queries.js
[x] Removed the useEffect and axios on the Resources component
[x] Used the useQuery hook on the Resources component

Related Tickets & Documents (Optional)

Closes issue #143.

Added tests?

Will add tests sooon :D

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation (readme.md or contributing.md)?

  • 📜 readme.md
  • 📜 contributing.md
  • 🙅 no documentation needed
  • 🙋 I'd like someone to help write documentation, and will file a new issue for it

@lpatmo
Copy link
Member Author

lpatmo commented Sep 26, 2020

Closing this PR in favor of #162.

@lpatmo lpatmo closed this Sep 26, 2020
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.

1 participant