Closed mohebifar closed 7 months ago
I'm trying to define an object prop and receive it in the host implementation of the element, however, I receive a [object Object] string in the host.
[object Object]
I've tried defining my own RemoteElementPropertyType, but I only see parse being invoked with [object Object].
RemoteElementPropertyType
parse
export const RemoteObject: RemoteElementPropertyType<object> = { parse(value: string) { console.log("parse -->", value); return JSON.parse(value); }, serialize(value: object) { console.log("serialize --->", value); return JSON.stringify(value); }, }; const BoxElement = createRemoteElement<RemoteBoxProps>({ properties: { color: { type: String, }, padding: { type: String, }, rounded: { type: String, }, style: { type: RemoteObject, }, }, });
I'm trying to define an object prop and receive it in the host implementation of the element, however, I receive a
[object Object]
string in the host.I've tried defining my own
RemoteElementPropertyType
, but I only seeparse
being invoked with[object Object]
.