useConfig is not useful

import ForgeUI, {Avatar, render, Fragment,useProductContext, Macro, Text, ConfigForm, TextArea, useConfig} from "@forge/ui";
const App = () => {
  const config = useConfig();
  const terms = config && config.terms.split('\n');
  const definitions = [];
  const { contentId } = useProductContext();
  if (!config || !config.terms) {
    return <Fragment>
      <Text>No terms</Text>
  return (
export const Config = () =>
      label="Terms to include (one per line)"
export const run = render(
<Avatar accountId="5a1234bc8d12345e3f1g11hi" />
    app={<App />}

why useConfig is not useful
i console it is undefined;

Hi @111112

It is probably undefined because no config values from the properties dialog have been set for that page.

Also, the code looks a bit difficult to follow. Try following to get things working.

1 Like

I according to the demo
Even if the Bitbucket also cant use