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

React-Livechat: cannot update params when re-render

Open khaht opened this issue 7 years ago • 1 comments

I want to update params if user logged, get user info to update params. If user info not found then set params default. Issue: params cannot update when user logged, in widget live chat show info default. My code: render () { return ({ (user.dataUser) ? <LiveChat license = {} params={[{name: "Email", value: user.dataUser.email}]} /> : <LiveChat license = {} params = {[{name: "Email", value: "[email protected]"}]} / }) }

khaht avatar Apr 12 '19 02:04 khaht

Hello @khaht 👋

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