How to use the arc.arc.getObservable function in arc

To help you get started, we’ve selected a few arc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github daostack / alchemy / src / components / DebugContainer.tsx View on Github external
const ReputationMintsContainer = () => {
  const query = gql`{
      reputationMints {
        contract
        amount
        address
      }
    }
  `
  return {
    (state: IObservableState) => {
      if (state.isLoading) {
        return <div>loading mints</div>
      } else if (state.error) {
        throw state.error
      } else {
        return <span>found {state.data.data.reputationMints.length} reputation mints</span>
      }
    }
  }
}
const DebugContainer = (props: IProps) =&gt;  {