Migrating from Capsule to Para
Guide for migrating from @usecapsule/* packages to @getpara/* packages
Overview
This guide covers the migration process from Capsule to Para SDKs. The migration includes package namespace changes, method signature updates to use object parameters, and introduces new React hooks for state management.
Package Changes
All packages have been migrated from the @usecapsule
namespace to @getpara
. Update your dependencies by replacing @usecapsule
with @getpara
in your package.json:
All packages have been reset to version 1.0.0 under the new namespace. The functionality and package names remain the same - only the organization prefix has changed from @usecapsule
to @getpara
.
Mobile SDK Updates
Flutter
The Flutter package has moved from capsule
to para
on pub.dev:
Create instances using Para()
instead of Capsule()
. All method signatures remain unchanged.
Swift
The Swift SDK package is now available at github.com/getpara/swift-sdk
. The main class has been renamed from CapsuleManager
to ParaManager
, while maintaining the same method signatures:
Method signatures and functionality remain identical for both mobile SDKs - only the package names and main class names have changed.
Breaking Changes
Method Updates
All methods have been updated to use object parameters instead of multiple arguments. This change improves extensibility, type safety, and reflects our commitment to consistent API design.
All methods now use object parameters with optional properties defaulting to reasonable values. This change makes the SDK more maintainable and easier to extend in the future.
New Features: React Hooks
Para now includes React hooks for easier state management and SDK interaction. Here’s a basic setup:
Available Hooks
Next Steps
- Update your package dependencies to use
@getpara/*
packages - Migrate method calls to use new object parameters
- Consider implementing React hooks for simpler state management
- Review framework-specific integration guides for detailed setup instructions