#Component props are not updating

1 messages · Page 1 of 1 (latest)

arctic ridge
noble steppe
#

Hi Kiran. Do you have any errors in your console? Can you share your code?

arctic ridge
#

Here is the code snippet

import { Puck } from "@measured/puck";
import "@measured/puck/dist/index.css";

import HeroBlock from "@/blocks/Hero";

const config = {
  components: {
    HeroBlock: {
      fields: {
        title: {
          type: "text",
        },
        subtitle: {
          type: "text",
        },
      },
      defaultProps: {
        title: "Hello, world!",
        subtitle: "This is a subtitle",
      },
      render: ({ title, subtitle }) => {
        return <HeroBlock title={title} subtitle={subtitle} />;
      },
    },
  },
};

const initialData = {
  content: [],
  root: {},
};

const save = (data) => {
  console.log(data);
};

export default function Editor() {
  return <Puck config={config} data={initialData} onPublish={save} />;
}
#

I'm not seeing any errors in the console.

noble steppe
#

Hm I can't reproduce this. Can you share a repo that I can jump into?

arctic ridge
noble steppe
#

Hey @arctic ridge. Have identified the issue as a change in v0.11.0. Have rolled a fix into 0.11.3-canary.487ab83

noble steppe
#

v0.11.3 has been released. I tested it and it worked in your branch.