How do I access Web Widget API commands in my React App?
已于 2022年10月19日 发布
Stupid question - I know. But how do I access commands like zE('messenger', 'open'); straight from my react app?
All of those commands are perfectly accessible via console in dev tools. But when I try to access them in my React app functions. It doesn't work.
I basically need this to work:
<button onClick={() =>
zE('messenger', 'open')
}>Open chat window</button>But it keeps saying i dont have zE defined. Yet it works in the console.. Ahh
Thanks!
0
1
1 条评论
Tipene Hughes
Hey Jiří Štěpánek,
Can you try calling the zE method against the window object and see if that works for you? i.e:
0
登录以发表评论。