TeselaGen / tg-oss

Teselagen Open Source modules
https://teselagen.github.io/tg-oss/
MIT License
37 stars 18 forks source link

Issues with hardcoding react versions and duplicate react instances #73

Closed smeng9 closed 2 months ago

smeng9 commented 2 months ago

@tnrich

I recently started a new project with a fresh react template from vite, it has the react dependencies set as ^18.0.0 When I perform a yarn install or npm install, it will lock the version to 18.3.1

However the project hardcode the react and react-doc version to 18.2.0 https://github.com/TeselaGen/tg-oss/blob/master/package.json#L50

I checked the lock file. This causes duplicate version of react and my hooks break https://react.dev/warnings/invalid-hook-call-warning because You might have more than one copy of React in the same app.

We should relax the react version requirement (at least within the major version of react 18 range) and later add react 19 also to the compatible version list.

tnrich commented 2 months ago

@smeng9 I'm fine with accepting a PR to relax the react versions.

tnrich commented 2 months ago

Publishing updated packages now