OneSignal / react-onesignal

React OneSignal Module: Make it easy to integrate OneSignal with your React App!
Other
74 stars 23 forks source link

[question]: Why is this library marked for React? #100

Open Tanner-Scadden opened 1 year ago

Tanner-Scadden commented 1 year ago

How can we help?

Just wondering why this library is packaged under a react label/why there isn't a vanilla npm package for one signal. Just wondering what the limitations are of it that rely on react.

I was able to install this package and use it inside of a solid-js app. Not a fan of using packages with CDNs due to no Typescript support/global variables. Thanks!

rgomezp commented 1 year ago

Great question!

Other frameworks like Vue use "plugins." For that reason, we chose to make plugins for Vue, Angular, etc... that meet the developer at their point of need -- that is, those packages are imported and used as plugins as defined by each framework's API contracts. The goal here was ease of use / convenience.

That said, you bring up a good point around this plugin actually being framework agnostic and thus the react label not quite describing it accurately.

We will certainly be thoughtful of how we can improve this moving forward.