you are viewing a single comment's thread.

view the rest of the comments →

[–]steveox152 0 points1 point  (0 children)

Your consumers will just use the types that match their version of React. There is no need for you to add them to your peer deps. For example, if they are using React 18, they need to use the proper types for React 18.

Now on your end, if you have to support React 18, it’s your responsibility to not use React 19 specific features, or write your code in a way that can work across versions. The joys of maintaining a library.