tawk / tawk-messenger-react

Official React plugin for Tawk messenger
https://www.tawk.to
Other
23 stars 15 forks source link

incompatible with react 18 #10

Open md-redwan-hossain opened 2 years ago

md-redwan-hossain commented 2 years ago

I tried to install tawk react package but it throws a error saying incompatible with react dom 18. See the atached error log and screenshot. https://termbin.com/gb1b react_bug

jaoaustero commented 2 years ago

Hi @redwan-hossain we are aware on the error and I already submit a pull request on the team, this will be on under review and test. Pull request #11

Thank you

jaoaustero commented 2 years ago

Hi @redwan-hossain We already now supporting version 18 of react, we have new updates on the plugin that will resolve the issue

https://www.npmjs.com/package/@tawk.to/tawk-messenger-react

soheb-mpc91 commented 2 years ago

### I AM USING TYPESCRIPT.

@jaoaustero - I am trying to use tawk in react@18.1.0, Installation is success but i am getting type error when i try to import with code import TawkMessengerReact from '@tawk.to/tawk-messenger-react';

image

I am also trying to install with npm package npm i --save-dev @types/tawk.to__tawk-messenger-react but getting below error:

image
jaoaustero commented 2 years ago

Hi @soheb-mpc91 currently we don't yet support typescript but this was the next thing we will update

soheb-mpc91 commented 2 years ago

@jaoaustero - Any update on https://github.com/tawk/tawk-messenger-react/issues/10#issuecomment-1141854908 ?

jleknes commented 2 years ago

Have you considered supporting react 17 in the latest version of the plugin? Now you have set a 18.1.0 as the minimum version of react and react-dom in peerDependencies. This throws a warning if you try to use the plugin with react 17. And do you really need the peer dependency to react-scripts?

jaoaustero commented 2 years ago

@jleknes You can still use this plugin in react 17 by using the lower version 1.0.0

jleknes commented 2 years ago

@jaoaustero: Yes, but version 1.0.0 has lots of outdated dependencies with critical vulnerabilities.

Is version 2.0.1 really incompatible with react 17 or have you just set the peerDependency too aggressively?

smith558 commented 4 months ago

Hi @soheb-mpc91 currently we don't yet support typescript but this was the next thing we will update

Just discovered this. This is quite unfortunate for us.