Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

65
Views
React Native: use settimeout to change mobx store value with delay

In my react native app I'm using firebase notifications, in my foreground notifications handler I have this method, I change value to true, wait 3 seconds and then change back to false, but it's not working...

App.js

const handleForegroundNotification = (message) =>
    {
        const typingTimer = null;
        mapStore.setNotificationModalVisible(true);
            mapStore.setNotificationModalData(message);
            typingTimer = setTimeout(() => {
                
                mapStore.setNotificationModalVisible(true);
            }, 5000);
    };

There is no error log.

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs