You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current implementation of the metacom library relies on the global object window, which is not available on some non-browser environments, such as React Native. As a result, users of these platforms face difficulties when trying to use the metacom library. This dependency on the window object makes the library less flexible and limits its potential use cases.
Describe the solution you'd like
To make the metacom library more platform-agnostic, I propose that we remove the dependency on the global object window. Instead, we can use a more universal way to access the global object, such as globalThis. This would allow the library to be used on platforms where the window object is not available, like React Native, without causing any issues or requiring additional workarounds.
Describe alternatives you've considered
An alternative solution would be to provide a separate build of the metacom library specifically designed for use with React Native or other non-browser environments. However, this approach would require maintaining two separate codebases, which could lead to inconsistencies and make it more challenging to keep both versions up to date.
Another alternative would be to add an optional configuration parameter: "online" event listener. This would require additional documentation and could be less user-friendly than a platform-agnostic approach.
Is your feature request related to a problem? Please describe.
The current implementation of the metacom library relies on the global object
window
, which is not available on some non-browser environments, such as React Native. As a result, users of these platforms face difficulties when trying to use the metacom library. This dependency on the window object makes the library less flexible and limits its potential use cases.Describe the solution you'd like
To make the metacom library more platform-agnostic, I propose that we remove the dependency on the global object window. Instead, we can use a more universal way to access the global object, such as globalThis. This would allow the library to be used on platforms where the window object is not available, like React Native, without causing any issues or requiring additional workarounds.
Describe alternatives you've considered
An alternative solution would be to provide a separate build of the metacom library specifically designed for use with React Native or other non-browser environments. However, this approach would require maintaining two separate codebases, which could lead to inconsistencies and make it more challenging to keep both versions up to date.
Another alternative would be to add an optional configuration parameter: "online" event listener. This would require additional documentation and could be less user-friendly than a platform-agnostic approach.
metacom/dist/metacom.js
Line 10 in cb501f1
The text was updated successfully, but these errors were encountered: