This is already implemented in 0d4424af3c0db323347c0e7c02aab96fbfbb96d1
I'm opening this in case someone has comments about this, and to keep track of tasks that should be done before this is released:
[x] Update README and other docs to mention adding React dependency
[x] Mention against which React version is Reagent tested
[ ] Update reagent-template (ping @yogthos)
Purpose of the change is to make it easier for Reagent consumers to select how and what React version they use (so continuing the previous changes which moved DOM functions to separate ns). Providing direct dependency to cljsjs packages adds unnecessary packages to environments where they aren't needed, like projects using shadow-cljs, or React-native projects. This also makes it more obvious that consumer projects can select React version themselves, as Reagent should support different React version quite well.
It is also similar to how in JS ecosystem the React libraries declare React as peerDependency, meaning that npm will warn if React isn't provided, but the consumer projects have to provide React dependency themselves.
Note: though this is breaking change, I'm thinking of using 1.1 as the next version number. Reagent doesn't need to follow SemVer and I think this isn't so big breaking change that this would demand 2.0 release.
This is already implemented in 0d4424af3c0db323347c0e7c02aab96fbfbb96d1
I'm opening this in case someone has comments about this, and to keep track of tasks that should be done before this is released:
Purpose of the change is to make it easier for Reagent consumers to select how and what React version they use (so continuing the previous changes which moved DOM functions to separate ns). Providing direct dependency to cljsjs packages adds unnecessary packages to environments where they aren't needed, like projects using shadow-cljs, or React-native projects. This also makes it more obvious that consumer projects can select React version themselves, as Reagent should support different React version quite well.
It is also similar to how in JS ecosystem the React libraries declare React as peerDependency, meaning that npm will warn if React isn't provided, but the consumer projects have to provide React dependency themselves.
Note: though this is breaking change, I'm thinking of using 1.1 as the next version number. Reagent doesn't need to follow SemVer and I think this isn't so big breaking change that this would demand 2.0 release.