livechat/chat-widget-adapters

Params support

tmyers101 opened this issue · 1 comments

Does this package support a params prop for React? I didn't notice an option for that prop unlike the old react-livechat package.

Hello @tmyers101 👋

The old params property was using deprecated name and structure. It is fully available in the new implementation as sessionVariables the same way as in our JS API method set_session_variables.

You can read about it in the package description here: packages/widget-react#config-data

The sessionVariables accepts a shape of type Record<string, string>. Used in the component property can look like this:

<LiveChatWidget
  license="123456"
  sessionVariables={{
    username: "john.doe",
    cart_value: "450"
  }}
/>