Perspective Component Detect Theme Change

You should be accessing the session properties from the tree attached to the PageStore:

props.store.clientStore?.page?.sessionProps?.subscribe((tree) =>
  console.log(tree.read('theme'))
)
2 Likes