addPropertyControls() is a function from the Framer library that allows you to add property controls to your React components. It gives the user a UI to adjust properties of your component in Framer's design environment. This makes it easier for designers to manipulate the design directly, without editing the code.
component: The React component you wish to add controls to.
controls: An object that defines the controls. Each key-value pair in the object corresponds to a prop in the component. The key is the prop name, and the value is a ControlDescription object.
RenderTarget is an enum from the Framer library that helps you understand the context in which your component is being rendered. This allows you to adjust your component's behavior based on the context. It's often used in the
useEffect() hook or conditionally render elements.
RenderTarget.canvas: Rendered on the Framer Canvas.
RenderTarget.preview: Rendered in the preview.
RenderTarget.export: Rendered for export.