-
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
Ability to subscribe using React Hooks #19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t understand very what you try to do according with official documentation in react
React hooks lets developers use state without creating a class component. Our SDK currently relies on component state to be able to add / change messages. I just added a condition to check for the new functional components that access state without being a stateful component |
@nxsyed I understand about react hooks but I don’t understand well you change you’re declaring a variable which comes like a parameter |
I didn't want to change too much of the code to add the feature - if the developer happens to pass in a functional component the component variable would break the app. I'm just adding the properties the function expects. I'm curious if you have a different solution? |
No description provided.