Screenshots

Version
v4.5.0 built from master branch
Description
The development team recently bumped Web Chat's React dependency to v16.8.6 which introduces React Hooks to Web Chat. While working on a pull request for the typing indicator, I tried to use the useState and useEffect hooks in a component; however, Web Chat threw an "Invalid Hook" Error. I created a really simple component to double check it wasn't my logic, but Web Chat still threw the error.
To Reproduce
Add a simple component with React Hooks to Web Chat.
const TypingIndicator = () => {
const [item] = useState('Hello, World!');
return <div>{ item }</div>
}
Expected behavior
React Hooks should not cause Web Chat to crash.
[Bug]
Screenshots
Version
v4.5.0 built from master branch
Description
The development team recently bumped Web Chat's React dependency to v16.8.6 which introduces React Hooks to Web Chat. While working on a pull request for the typing indicator, I tried to use the
useStateanduseEffecthooks in a component; however, Web Chat threw an "Invalid Hook" Error. I created a really simple component to double check it wasn't my logic, but Web Chat still threw the error.To Reproduce
Add a simple component with React Hooks to Web Chat.
Expected behavior
React Hooks should not cause Web Chat to crash.
[Bug]