How this works
When rollbar-react-native detects it is on a web-only target, it returns a browser-js instance. When it is on a web + native target, it returns a rollbar-react-native instance with a browser-js instance at the rollbar property.
This PR allows the app code to access the browser-js instance at the rollbar property regardless of which instance type is returned.
Type of change
[x] Bug fix (non-breaking change that fixes an issue)
Description of the change
Enables code compatibility between Rollbar-react, Rollbar.js and Rollbar-react-native, including Typescript compatibility.
Allows the same initialization, whether the target is web/JS only or JS + Native.
How this works When rollbar-react-native detects it is on a web-only target, it returns a browser-js instance. When it is on a web + native target, it returns a rollbar-react-native instance with a browser-js instance at the
rollbar
property.This PR allows the app code to access the browser-js instance at the
rollbar
property regardless of which instance type is returned.Type of change
Related issues
Fixes https://app.shortcut.com/rollbar/story/121632
Development