<Connect />
component, through which a connection to an organization is described, and a series of hooks: useApp()
, useApps()
, useOrganization()
, usePermissions()
.@aragon/connect-react
package to your project. It contains all the exports of the @aragon/connect
, so you don’t have to install both.location
String
connector
Connector
or [String, Object]
or String
Connector
instance, and either a string or a tuple for embedded connectors and their config.options
Object
[Organization | null, { loading: boolean, error: null | Error, retry: Function }]
appFilter
String
or Object
(optional)0x
, and by appName
otherwise. See appFilter.address
and appFilter.appName
to set them explicitly. For the time being, only one type of filter can get passed at a time.appFilter.address
String
appFilter
, but makes the selection by address
explicit.appFilter.appName
String
appFilter
, but makes the selection by appName
explicit.[App | null, { loading: boolean, error: null | Error, retry: Function }]
appFilter
String
or String[]
or object (optional)0x
, and by appName
otherwise. When an array is passed, the first entry determines the type of filter. See appFilter.address
and appFilter.appName
to set them explicitly. For the time being, only one type of filter can get passed at a time.appFilter.address
String
or String[]
appFilter
, but makes the selection by address
explicit.appFilter.appName
String
or String[]
appFilter
, but makes the selection by appName
explicit.[App[], { loading: boolean, error: null | Error, retry: Function }]
[Permission[], { loading: boolean, error: null | Error, retry: Function }]
useEffect()
or useMemo()
hooks, except that it doesn’t update the callback when omitted.onX
equivalents of the async methods, like votes(filters)
and onVotes(filters, callback)
.createAppHook()
hooks requires to call the onX
equivalent of the async method you want to use, but without passing a callback. App connectors return a partially applied function when the callback is omitted, which createAppHook()
takes advantage of by entirely managing the subscription.