How to pass function props to code components?

Hi Team,

Is there a way to pass functions as props or while registering the components. As I am facing issue while Registering below AntD Components. I have grouped them as per the need of function. Because of this I’m not able to test these directly on Plasmic Studio.

A. Below components need render functions e.g. RenderItem to be passed as props :

B. Components getting displayed with methods like on, show (Conditional) :

import { message, Button } from 'antd';

const info = () => {
[]('This is a normal message');

<Button type="primary" onClick={info}>
Display normal message

Thank you.

Hi @then_camel, there’s currently no way to pass a function from Plasmic studio to code.

For the items in B, maybe you can create components that wrap Ant components adding some functionality, e.g.:

function MessageButton({ msg: string, ...props }) {
  const info = () => {
  return <Button {...props} onClick={info} />;


registerComponent(MessageButton, {
  name: "MessageButton",
  props: {
    msg: string;

For something like antd’s List, maybe you can implement a wrapper using Plasmic’s repeatedElement?

Thank you. I will go through this link.