react-livechat icon indicating copy to clipboard operation
react-livechat copied to clipboard

User infos not updated after visitor prop changed

Open IcanDivideBy0 opened this issue 7 years ago • 3 comments

User infos should be updated (in livechat admin) when the visitor prop is changed.

IcanDivideBy0 avatar Mar 21 '19 15:03 IcanDivideBy0

Hi, you can try overwrite global values that LiveChat uses.

   window.__lc.params = this.props.params;
   window.__lc.visitor = this.props.visitor;

That are only set when LiveChat loads so I am not sure if they will automatically update, but they should :)

tomekvenits avatar Mar 21 '19 15:03 tomekvenits

Thanks for the workaround, i'll try that. But still I'd prefer the value to be auto sync'ed with the prop

IcanDivideBy0 avatar Mar 21 '19 15:03 IcanDivideBy0

Hello @IcanDivideBy0 👋

I am happy to say that we have created a new set of packages to support more frontend frameworks integration with LiveChat Chat Widget: Chat Widget Adapters 🙂

From now on it will be the official, actively maintained repository for each framework-specific package that allows easy integration of LiveChat Chat Widget. The Hooks API is one part of the new React package: @livechat/widget-react.

In the new implementation, all props for the main component are synced with Chat Widget 🙂

walaszczykm avatar Jan 20 '22 11:01 walaszczykm