carsonwah / react-native-push-notification-popup

A <NotificationPopup/> component for presenting your own push notification in react-native app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined is not a function evaluation (popup.show...)

16ntu1120 opened this issue · comments

Whenever I try to show the notification for the first time this error is shown up and after pressing ctrl+s the and by sending the notification again from firebase the notification will appear perfectly. I'm using functional components with hooks.
let popup = useRef();

can anybody tell me the issue please?
issue

Whenever I try to show the notification for the first time this error is shown up and after pressing ctrl+s the and by sending the notification again from firebase the notification will appear perfectly. I'm using functional components with hooks.
let popup = useRef();

can anybody tell me the issue please?
issue

Have you solved this problem yet?

@nguyenanh15081998 no I couldn't have you?

@nguyenanh15081998 yes I resolved this issue in my case I just made popup.show to popup.current.show it worked

yes I resolved this issue in my case I just made popup.show to popup.current.show it worked and declare ref like this
const popup = useRef("popup");