Ckd React Examples

Uses

Type info

const useAccount: () => {
  available: boolean; // is the channel loaded?
  data: {
    aid: string; // Ckd Account ID
    displayName: string; // Ckd Account Display Name
  };
};

Source code

import { useAccount } from "ckd-react";

export default function UseAccountExample() {
  const account = useAccount();

  return <pre>{JSON.stringify(account, null, 2)}</pre>;
}

*sign in required

Try it

{
  "available": false,
  "data": {
    "aid": "",
    "displayName": ""
  }
}