Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How can I show the timer current value when the button is clicked in react-native?

$
0
0

I have a react-native project. I have added a Component called a timer to my project. I call my timer in ComponentDidMount on the web. This part works fine.

In the Native (ios) part, I get the values I entered in the textbox. So when I click the button my counter has to start. I get my counter start value from the database. It works fine for the first time when I click the button.

However, when I exit and click the button many times, it does not count back from the correct value because it does not enter componentdidmount. I perform my operations in JoinRoom function. (button click). It calculates the value correctly every time I click the button. But when writing on the screen, it is wrong. In short, I have a problem not calculating the value but showing it on the screen.

I'll be happy if you can help me.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>