Skip to content
Advertisement

Tag: react-native

How to pass React Native Component as a JSON object

I want to use react-native-intro-slider in my react native application to make the intro pages as a slider. I have already implemented the pages as react functional components (where I can import them and use, ex:- ). But it seems that react native slider takes an array of json objects as inputs. Ex:- Instead of above json objects I want

Avoid repeating params in stack navigation

I am building the auth part of the stack navigation for a react navigation app, and ended with something like thiss: Is there any way I can avoid adding the url initialParams everywhere and add it maybe to the stack group screen around? I tried to add it in the screenOptions prop in the stack group around, but didn’t work.

.push( ) is not updating the variable

I am trying to push the data that is set using setData function to datas[ ]. I am able to push the data once, but the 2nd time when I push it, instead of being stored at datas[1], it replaces datas[0]. What am I doing wrong here. Thank you in advance. Answer App is getting re-rendered whenever you change states,

i am failing to access a func in my child component

the are about three more components between this one and the one i want it to function in, so i keep on passing it down as a prop till i get to the component i want. it is supposed to run when the user clicks a button but i get an error that this.props.route.params.ToggleFavorites is not a function please help!!!!

Advertisement