blockful-io / external-resolver-dapp

https://external-resolver-dapp.vercel.app
2 stars 2 forks source link

refactor: Isolate Backend Calls Using Custom Hooks #247

Open eduramme opened 1 day ago

eduramme commented 1 day ago

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

Additional Notes

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