-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider a different API #30
Comments
@JulianKingman Thank you so much for your comments! We've recently started re-analyzing some of our SDKs and the React one is the first one that we've noticed wherein your comments are exactly the same as our observations. In other words, we completely agree. Rest assured we're in the process of planning out a newer refactor to this SDK such that it follows the standard React patterns better and feels more natural to use. We really appreciate your feedback and will take them into consideration as we plan further. |
@davidnub if you want some inspiration, I'm working on a Provider/Context API internally for my app using the JS package here: https://github.com/DesignmanIO/trainerengine-mobile/tree/master/Components/PubNubContext It's a work in progress, but may give you some ideas. Feel free to copy/paste. |
Thanks @JulianKingman . I'll keep that in mind when we start reviewing options for change. |
I came here to say the exact same thing as @JulianKingman. The current API feels a bit off for the reasons already mentioned above. I have also taken a similar React Context based approach in my application that works pretty well with the JS SDK. |
@JulianKingman and @ottoo Just wanted to inform both of you of our recent beta release of React 2.0 https://github.com/pubnub/react/tree/v2.0 I hope this is a good start to what you guys might be expecting from such an SDK. Looking forward to hearing additional feedback and suggestions. |
@davidnub yay, it looks really good! Can't wait to try it. |
Thanks, there are still some extra things to add to it (ie. More Hooks etc) but hoping to get things flushed out as feedback comes in as well. I'm going to close this Issue since it has been considered and we're working towards it. Feel free to open more or reach out as you have more feedback and suggestions. Thanks again for the comments! |
The API for pubnub react is at odds with standard react patterns. For that reason I find myself using the JS SDK and ignoring this package, and wishing it were something different. This is what I wish this package did:
PubNubProvider
Provider component (accepts initiated pubnub instance) andwithPubNub
consumerI don't really expect that this will be implemented, but thought it might be useful feedback, and would make this much more intuitive to react and react native developers.
The text was updated successfully, but these errors were encountered: