theKashey / react-focus-lock

It is a trap! A lock for a Focus. 🔓
MIT License
1.27k stars 67 forks source link

React 18 support limited by transitive dependency #217

Closed billyjanitsch closed 2 years ago

billyjanitsch commented 2 years ago

Hi! I see that 2.9.0 was released with the changelog noting React 18 support.

Unfortunately, the library technically isn't compatible with React 18 because it depends on react-clientside-effect@^1.2.5, which doesn't permit React 18 as a peer dep. This means that recent versions of npm will refuse to install react-focus-lock alongside React 18.

I see that you're also the owner of react-clientside-effect, so this should be an easy fix. I've submitted a PR there (https://github.com/theKashey/react-clientside-effect/pull/5) to add React 18 to peer deps. If you merge that and release react-clientside-effect@1.2.6, then upgrade the dependency in react-focus-lock to react-clientside-effect@^1.2.6 and release react-focus-lock@2.9.1, that will resolve the issue.

Thanks!

theKashey commented 2 years ago

https://github.com/theKashey/react-clientside-effect/pull/5 has been released (v1.2.6). react-focus-lock update is waiting for https://github.com/theKashey/focus-lock/issues/36 to be resolved....

theKashey commented 2 years ago

Released as 2.9.1