Hi!
According to the Vaadin documentation, the following methods need to be defined to be able to pass attributes to a react components:
@NpmPackage(value = "tldraw", version = "latest")
@JsModule("./component/custom-renderer.tsx")
@Tag("custom-renderer-component")
class CustomRendererComponent : ReactAdapterComponent(), HasSize {
fun getSrc(): String {
return getState("src", String::class.java)
}
fun setSrc(src: String?) {
setState("src", src)
}
}
In order to pass a parameter, it must be defined. In your case, I created a srcState
in the react component:
const [src, setSrc] = hooks.useState("src", "initial");
Next, you just need to call the method or set the src
attribute value to get the desired result:

In this case Jmix has nothing to do with working with react components, as it completely reuses the capabilities of Vaadin. Perhaps you can get more information you are interested in if you contact the Vaadin forum: Vaadin Forum
For example, I found information about passing parameters in this topic: Trying out React components in Flow in Vaadin 24.4 beta1 - Vaadin Forum
Best regards,
Dmitriy