How to add a pop-up in the home page of an app using react-native and javascript?

48
June 16, 2019, at 2:00 PM

I have a javascript code for a home page in my app. I want to make every user see a pop-up on the screen when they open an app, click a button, and then they can use the app. As well, I need to make sure that once they click the button they do not see that pop-up screen again.

Answer 1

You can use AsyncStorage from facebook to set and retrieve the data. check this out facebook async storage

Second approach

Also, If you are already using redux, you can try to persist-store

For details check here

Answer 2

For popup, you can use react native modal library.

In order to make the popup not appear again after the button press then you should use AsyncStorage.

Save a key-value pair when the button is pressed. Before the popup appears, make sure to retrieve the data from the AsyncStorage and verify if the value is present.

READ ALSO
toggle function works but not slideToggle in jQuery

toggle function works but not slideToggle in jQuery

I'm trying to make the slideToggle work but couldn't figure outAs per different answers, I tried adding display: block and display: none but that isn't working either

47
how to get substring length of sub array in javascript?

how to get substring length of sub array in javascript?

I am trying to solve this problem but I am not getting the expected output

21
How to order the order of returned API calls with generators?

How to order the order of returned API calls with generators?

I'm practicing some more advanced Javascript techniques, and came across generators and iterators as something I wanted to look intoI know that I'm doing this incorrectly, but I'm not really sure how to go about it

46
Why are elements in 3d rendering at the wrong size only at certain angles of perspective and rotation?

Why are elements in 3d rendering at the wrong size only at certain angles of perspective and rotation?

I'm trying to create a 3d hallway using css and react inline stylesThe function mimics a first-person perspective by translating and rotating the cuboid in relation to mouse position and arrow key inputs

37