Closed urvish91 closed 2 years ago
This is a good suggestion -- I saw this discussion back then in Twitter but I didn't follow this through. I'll see this done. Thanks for reporting!
Hi, I am trying to use react-bs-datatable with react 17.0.1 but it is giving me "Invalid hook call" error. When I look at react versions after installing react-bs-datatable I see 2 versions of react 17.0.1 (which is primary) and 16.14.0 (which i believe is dependency of react-bs-datatable). Please guide me how to solve this issue.
I already reported this error. @Imballinst Please solve this asap and send as new version so that it can auto fixed. we are waiting eagerly for this.
For temporary solution @sdipesh , once you install then open node_modules --> react-bs-data-table --> node_modules -> and then delete react and react dom folder. it will work.
I have done the same way and its working awesome.
Sorry for the delay! I've been busy for the last week. I'll try to work on it today.
@urvish91 @sdipesh I just published react-bs-datatable@2.1.3-alpha2
for testing—the PR is up in https://github.com/Imballinst/react-bs-datatable/pull/79. I think the issue is gone. Could you verify by installing it on your end? If the issue is gone, then I'll merge it and I'll publish the non-alpha release.
I came to know that if in my nextJS app if I have react dom and react version is latest 17.0.1. then I am getting react dom error because you are also using this with different version and system finds two react version. so it gives error Invalid Hook.
so to solve this issue kindly use react and react dom as a peer dependencies and dev dependencies. so that it not comes in our package.