@aragon/api-reactto connect an app's frontend to its contract, fetch some data from its state (
appState), and trigger an action on it (
api.increment(1)). The full API is detailed below.
""(empty string) when there is no account connected.
abi: the app's ABI
appAddress: the app's contract address
appId: the app's appId
appImplementationAddress: the app's implementation contract address, if any (only available if this app is a proxied AragonApp)
identifier: the app's identifier, if any
isForwarder: whether the app is a forwarder
kernelAddress: the app's attached Kernel address (i.e. organization address)
name: the app's name, if available
roles(experimental): an array of this app's roles
icon(size)function, that allows you to query for the app's icon (if available) based on a preferred size.
nulluntil it gets loaded.
appearanceis currently one of
dark. Other values could be passed in the future (e.g.
blackfor OLED screens). It is always present and should be respected by apps to display a corresponding theme, unless
themecontains an entire theme object (e.g. aragonUI's light theme) that should be applied to the app. It is optional and apps should respect it when present. If not possible, apps should respect the value of
) until the list of apps are loaded.
requestPath()to request the app be navigated to another path. Note that the navigation request may be rejected, and in that case the
pathwill stay constant.
apientry from the
appStateentry from the
connectedAccountentry from the
currentAppentry from the
guiStyleentry from the
installedAppsentry from the
networkentry from the
Do you have a question? Leave your comments here at our Discourse forum 👇