You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are many components in react that are using callback functions inside objects, it seems it's not working with web component JSON format, which is in fact expectable since it's just text, and it can't understand what is the function in the JSON. but would be really nice if we could use function as a object param like this.
I think what you want to achieve is communication between web components or with a web component. I would use something like Custom Event or Broadcast Channel to communicate inside/outside the component, just like what you would do with iframes.
I think they need to parse json object in the same way they're parsing the parameters. So, any function prop inside json will be parsed and mapped correctly.
Also, they can do a better job in how defining R2WCOptions<HeaderProps> to not need to pass string values for property types. So: instead of onClick: 'function' we will have onClick: WcTypes.Function.
There are many components in react that are using callback functions inside objects, it seems it's not working with web component JSON format, which is in fact expectable since it's just text, and it can't understand what is the function in the JSON. but would be really nice if we could use function as a object param like this.
is there any other way other than using the function param only as top level param?
The text was updated successfully, but these errors were encountered: