You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The New ReactorProvider accepts an actors prop for registering multiple actors at once. This eliminates the need to manually register actors with a separate function, making setup more declarative.
The new API allows developers to pass an actors object to ReactorProvider, which registers actors by name. This simplifies managing multiple actors and enables using names as parameters inside hooks.
New hooks like useQuery, useMutation, and useActor provide flexible interaction with canister methods. Hooks can now take additional parameters for handling callbacks, loading states, and errors.
1. ReactorProvider Enhancements
The New
ReactorProvider
accepts anactors
prop for registering multiple actors at once. This eliminates the need to manually register actors with a separate function, making setup more declarative.Example Usage:
2. Registering Actors
The new API allows developers to pass an
actors
object toReactorProvider
, which registers actors by name. This simplifies managing multiple actors and enables using names as parameters inside hooks.Usage Example:
The
actors
object:3. Enhanced Hooks for Actor Methods
New hooks like
useQuery
,useMutation
, anduseActor
provide flexible interaction with canister methods. Hooks can now take additional parameters for handling callbacks, loading states, and errors.Example Usage in a Component:
4. Advanced Features
compileResult
).Benefits of the Proposal
Implementation Plan
ReactorProvider
: Support for anactors
prop to handle actor registration.useQuery
,useMutation
,useActor
) with the proposed options.The text was updated successfully, but these errors were encountered: