-
Notifications
You must be signed in to change notification settings - Fork 27
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
undefined: this_currentMessageBarAlert.hideMessageBarAlert #24
Comments
I have the same problem. I think alert reference register has problem. |
are you sure that |
I think it is a binding problem. I used https://github.com/Qlean/react-native-messages. It's a simple message bar (So simple compared to this project) but they implemented a better code( or binding solution) for message bar manager. Please take a look at their source code. |
+1 |
@hamidfzm thanks for showing me that library, it's definitely a better solution. I unfortunately don't have the time to do any major refactoring of this library right now, but I'll look into this issue again. unfortunately so far I haven't been able to reproduce the problem, but if anyone wants to share a simple demo project I'll take a look. |
Anyone has issue with this problem. You can surround the registerMessageBar function in a setTimeout function like below :
and don't use ref as string
@ikendoit don't use setState in your componentDidMount. If you really need it in componentDidMount; surround it with setTimeout 👍 |
Thank you @blntylmn , the way you used setTimeout was very clever ! I will surely try it your way. |
You can just register in ref callback: <MessageBar
ref={ref => {
MessageBarManager.registerMessageBar(ref);
}}
/> |
This seems similar to the upstream issue: KBLNY#46 |
Hello, I was trying out the message bar and i get this error :
my testMess():
My ComponentDidMount:
I set up everything as told in the manual but this didn't work.
Has anyone had this problem before ? i tried playing around with the MessageBarManager.js but nothing worked.
The text was updated successfully, but these errors were encountered: