Skip to content

chore: update lib architecture to use the instance in all cases. #7

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

Merged
merged 2 commits into from
May 27, 2025

Conversation

luchobonatti
Copy link
Member

Remove React hooks and update SDK usage

Changes

  • Removed built-in React hooks from the SDK
  • Updated SDK to use direct instance methods instead of hooks
  • Fixed parameter naming consistency (feeTier instead of fee)
  • Updated README to reflect current SDK state:
    • Removed React hooks references from features
    • Updated examples to show direct SDK instance usage
    • Added simple React integration example using react-query
    • Added more comprehensive examples for getPool and getPosition
    • Improved error handling documentation
    • Updated FAQ to remove React-specific questions

Why

The SDK was previously including React-specific hooks which:

  1. Added unnecessary dependencies
  2. Made the SDK less framework-agnostic
  3. Increased bundle size
  4. Made maintenance more complex

Moving to direct instance methods:

  1. Makes the SDK more flexible
  2. Reduces bundle size
  3. Simplifies maintenance
  4. Allows users to implement their own React integration if needed

Testing

  • Verified all SDK methods work correctly
  • Tested React integration example
  • Checked that all links are valid
  • Ensured parameter names match the actual SDK interface

@luchobonatti luchobonatti self-assigned this May 27, 2025
@luchobonatti luchobonatti merged commit 0a5dcd2 into main May 27, 2025
1 check passed
@luchobonatti luchobonatti deleted the chore/improve-lib-usage branch May 27, 2025 18:20
Copy link

🎉 This PR is included in version 1.0.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant