Closed ps-video-player closed 7 years ago
Absolutely, you can do:
window.xchild.onProps(props => {
...
});
Just what I was looking for! I might have completely missed it, but is xchild
documented anywhere? Or is the code the best place to look currently?
Yeah, it's something I need to get round to documenting. Glad it works for you though!
I'm passing down state from the iframe to my component using xcomponent. I'm using
updateProps
to then modify the props. These are getting passed down to the component, but I don't know when they change so I can't react to them. Is there a hook on child window to register a callback for whenupdateProps
is called from the parent?