renderer Property in Dialog Does Nothing in React

I am trying to make a dialog, but for some reason, the renderer property is not working. When I render this, something pops up, but the dialogRenderer function does not run. Here is my react function:

import React from 'react'
import '@vaadin/vaadin-dialog' // vaadin-dialog

export default function Dialog(props){
	function dialogRenderer(root, dialog){
		root.textContent = "This is some text"

			<p>dialogue time</p>
			<vaadin-dialog renderer={dialogRenderer} opened={true}></vaadin-dialog>

Using Web Components in React is a bit tricky as property binding doesn’t necessarily work as you’d expect. Here’s some info on Web Components & React

In this case, the value ends up as the element’s renderer attribute, not renderer property. In order to set it as a property, you’ll need to use ref to get a reference to the element and then set the renderer property to it

I see. It is strange though that other elements work as a React prop, such as opened and items on vaadin-grid.

Some properties might work because of attribute deserialization = you can set the grid’s items attribute as a JSON string representation of an array and Polymer will deserialize that as an actual array object and then assigns the result as the items property. Same thing with opened, though it’s a simpler case.