// define async setup function
async function initMySky() {
// load invisible iframe and define app's data domain
// needed for permissions write
const mySky = await client.loadMySky(dataDomain);
// load necessary DACs and permissions
// await mySky.loadDacs(contentRecord);
// check if user is already logged in with permissions
const loggedIn = await mySky.checkLogin();
// set react state for login status and
// to access mySky in rest of app
setUserID(await mySky.userID());
// call async setup function