Set-UDElement and React weirdness

Product: PowerShell Universal
Version: 2.0.3

Working with the code below to try and figure out Set-UDElement. I understand I’m probably not using the command correctly but having trouble when the cmdlet document doesn’t seem to be complete. I found a an older version of the command that refers to attributes instead of properties so I assume it has been updated? I found the code example in another post and slightly modified it.

New-UDDashboard -Title "TEST" -Content {
    New-UDTypography -Id 'text' -Text "TEST" 
    New-UDButton -Id 'Editable' -Text "EditText" -OnClick {
        Set-UDElement -Id 'text' -Properties @{text = 'Randomized'}
        Set-UDElement -Id "Editable" -Properties @{text = (Get-random)}
    }
    New-UDButton -Text "Hidemeh" -OnClick {
        Set-UDElement -Id 'text' -Properties @{text = 'Hidden'} 
        Set-UDElement -Id "Editable" -Properties @{hidden = $true}
    }
    New-UDButton -Text "Showmeh" -OnClick {
        Set-UDElement -Id 'text' -Properties @{text = 'Shown'}
        Set-UDElement -Id "Editable" -Properties @{hidden = $false}
    }
}

Problem 1: The ‘EditText’ button does work and changes the button text to a random number but the UDTypography text of ‘TEST’ is not updated to ‘Randomized’. The ‘Showmeh’ button also fails to update the UDTypography. Why?

Problem 2: The ‘Hidemeh’ button when clicked causes the React error below. When the minified error is decoded the error is:
Objects are not valid as a React child (found: Error: Minified React error #310; visit https://reactjs.org/docs/error-decoder.html?invariant=310 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.). If you meant to render a collection of children, use an array instead.

Is this a problem with version 2.0.3 or am I an idiot? I posted about this same error in another post but have not gotten a reply on it and since I am seeing it again I will include it here.

Definitely some weird stuff going on here. I see the issue with setting the text of the typography. I also had to clear\add instead of set to get it to work. I’ll need to look into what’s going on here. I was able to get this to work like this:

New-UDDashboard -Title "TEST" -Content {
    New-UDELement -Tag 'div' -Id 'text' -Content {
        New-UDTypography -Text "TEST" 
    }
    
    New-UDButton -Id 'Editable' -Text "EditText" -OnClick {
        Clear-UDElement -Id 'text'
        Add-UDElement -ParentId 'text' -Content {
            New-UDTypography -Text 'Randomized'
        }
        Set-UDElement -Id "Editable" -Properties @{text = (Get-random)}
    }
    New-UDButton -Text "Hidemeh" -OnClick {
        Clear-UDElement -Id 'text'
        Add-UDElement -ParentId 'text' -Content {
            New-UDTypography -Text 'Hidden'
        }
        Set-UDElement -Id "Editable" -Properties @{ style =  @{ display = 'none' } }
    }
    New-UDButton -Text "Showmeh" -OnClick {
        Clear-UDElement -Id 'text'
        Add-UDElement -ParentId 'text' -Content {
            New-UDTypography -Text 'Shown'
        }
        Set-UDElement -Id "Editable" -Properties @{ style =  @{ display = 'inline-flex' } }
    }
}