Open robertjcolley opened 2 years ago
RFC: what version should we use here? I figured the ideal version would be to use the actual running react native version, which react native does not expose in the global setup or the navigator setup. In a perfect world, they would be able to set the current running react native version somewhere and we read it in, but I don't think they do that.
I was able to patch in a version to react native like so:
This begs the question - should I open a PR with React Native to get this detection working from global.process.version so we can use that here? That might be a longer-term solution.
While implementing with amazon-chime-sdk-js, the react-native browser detection caused an error documented in this issue: https://github.com/aws/amazon-chime-sdk-js/issues/1856. This PR adds a default version based on the version here, which gets replaced when they cut a new version
https://github.com/facebook/react-native/blob/09b69036c023ccab47b7c5b950247217bb975686/package.json#L4