1

Usually when I try a React package from GitHub, I never bother checking the React version that the packages is using. I'm curious now; does it actually matter? Will there be any conflict between dependencies?

Let's say there is a React package, packageA, that is using React v16.8 while my React project is still using version15. It's a huge leap. Will there be an issue whereby packageA is using some advance feature which is not supported by my project? Or will this simply not happen because everything is handled nicely by BabelJS?

Super Jade
  • 5,609
  • 7
  • 39
  • 61
Isaac
  • 12,042
  • 16
  • 52
  • 116
  • This does happen, but not too often since React is a fairly stable platform. What happens a whole lot more is issues from different React Native versions. RN is an unstable platform and it's very common to find a library that fits your needs, but it isn't updated to work with the latest RN version. This has gotten a bit better over the years, but it's still very much a big growing pain of RN. – Etheryte May 18 '19 at 02:32
  • @Nit: The point is, I hardly had an issue to be honest that's why I never thought about this issue before. And simply wondering if this is all BabelJS's responsibility and hence we shouldn't worry about it – Isaac May 18 '19 at 02:34
  • Babel only compiles your sources, it doesn't do anything to overcome incompatibility between conflicting changes in library versions. – Etheryte May 18 '19 at 12:56
  • @Nit: Yeah but if I understand correctly, my project has own `node_modules`, and those React packages have their own `node_modules`, so I was thinking it may not be a concern, if BabelJS compiles each individual React packages with their own `node_module`, and lastly compile my project as a whole? – Isaac May 19 '19 at 00:31

0 Answers0