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

refactor: Isolate Backend Calls Using Custom Hooks #247

Open
4 tasks
eduramme opened this issue Nov 20, 2024 · 0 comments · May be fixed by #249
Open
4 tasks

refactor: Isolate Backend Calls Using Custom Hooks #247

eduramme opened this issue Nov 20, 2024 · 0 comments · May be fixed by #249
Assignees
Labels
enhancement New feature or request

Comments

@eduramme
Copy link
Collaborator

Isolate Backend Calls Using Custom Hooks

Description

Currently, backend calls are scattered directly within the components (blockchain-txs), making the code harder to maintain and reuse. The goal of this issue is to create custom hooks to isolate these calls, ensuring the code is more modular and easier to reuse.

Tasks

  1. Identify all backend calls currently present in the components.
  2. Create custom hooks to encapsulate these calls (e.g., useFetchData, useCreateResource).
  3. Ensure the hooks are reusable and follow best practices for composition.
  4. Replace direct backend calls in the components with the newly created hooks.
  5. Test the components to verify they still function correctly.

Acceptance Criteria

  • All backend calls should be encapsulated in custom hooks.
  • The hooks should be well-documented and easy to use.
  • Existing tests should pass, or new tests should be added if necessary.
  • The application’s behavior should remain unchanged.

Additional Notes

  • Suggest meaningful names for the hooks based on their functionality.
  • Adding support for loading and error handling within the hooks could be beneficial if not already implemented.
  • Follow the project’s existing design patterns, if applicable.

If there are any questions, please discuss them in the issue’s comments section.

@eduramme eduramme added the enhancement New feature or request label Nov 20, 2024
@eduramme eduramme moved this to 💡 Ideas in ENS Nov 20, 2024
@eduramme eduramme added this to ENS Nov 20, 2024
@eduramme eduramme self-assigned this Nov 20, 2024
@eduramme eduramme linked a pull request Nov 28, 2024 that will close this issue
@eduramme eduramme moved this from 🛠️ In Progress to 🔖 TODO in ENS Dec 3, 2024
@pikonha pikonha moved this from 🔖 TODO to ⛰️ Backlog in ENS Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ⛰️ Backlog
Development

Successfully merging a pull request may close this issue.

1 participant