Skip to content

Web Chat errors when built inside a React app of a different version that uses hooks #2461

@corinagum

Description

@corinagum

image

Version

latest bits

Describe the bug

Using hooks in a React App that hosts Web Chat, but uses a different version of React, results in error.

To Reproduce

Steps to reproduce the behavior:

  1. Build a basic React App using React version 16.8.0
  2. Insert the following hook: React.useEffect(() => console.log('mounted'), []);
  3. Host Web Chat inside the app
  4. Run and open the page in a browser.
  5. Note that the page does not build, and there are console errors like screenshot above

Expected behavior

App should not error out.

Additional context

@compulim has is fix in the bit Redux Hooks PR, but needs to extract it in time for 4.6

[Bug]

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or an unintended behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions