zth / rescript-relay-router

MIT License
16 stars 3 forks source link

Define peer-dependency on React >=18.2.0 #43

Closed Kingdutch closed 2 years ago

Kingdutch commented 2 years ago

We expect applications using Rescript Relay Router to provide React for us and we don't rely on the package ourselves which is common practice for libraries building on top of React.

This also fixes an issue that Yarn (3) reports about a missing peer-dependency in react-router which it otherwise expects us to provide.

A peer-dependency on react-dom is not added because at the moment the only reference to react-dom in R3 is to a hydrateRoot binding. However, in other cases we expect the user application to take care of bundling with Vite and hydrating the client with hydrateRoot. Thus we expect this binding to be moved from the router to our development application (or we should add a peerDependency on react-dom).

18.2.0 is chosen as minimum version based on https://github.com/zth/rescript-relay-router/pull/42

To make future changes to pkgPackage.json easier and more readable e16482e1650367870e97022f0fde491d9c2571c6 goes ahead and orders all dependencies by name.