Questions tagged [react-native-component]
67 questions
0
votes
0 answers
How to show component when a function is called in ReactNative (Like Alert.alert())
I would to create a custom component to be rendered when a function is called in ReactNative. Is like a alert() component. In this case i don't want use a modal, a want to make a component that can showed in screen when a function is called. Someone…

Gustavo Maltez
- 1
- 1
0
votes
1 answer
How to apply values from props to styles?
I created a custom component:
import React from 'react';
import {View, StyleSheet, TouchableOpacity} from 'react-native';
const Square = ({size, color, onPress, children}) => {
return (

Leem.fin
- 40,781
- 83
- 202
- 354
0
votes
1 answer
How to do component inheritance in React Native like on native platform?
My background is an iOS developer and in swift I could do MyInput: UITextField (swift component alternative to React Native Input).
This meant that MyInput automatically got all the properties and functions that UITextField has. Currently in react…

schmru
- 591
- 3
- 8
- 29
0
votes
2 answers
Unexpected token, expected ";" in react native
I am a newbie in react native, I am developing a video app to aid my learning curve. In the code below I have tried all I could to solve the error on the "displayModal" line, but could not. Please can anyone help me with this.
I want on image/video…

Benjamin Ikwuagwu
- 377
- 1
- 9
- 28
0
votes
3 answers
How can I bind an object to a SelectItem component?
Can anyone please help me on this? I'm using UI-Kitten's select and selectiem components, and I need to know how can I bind an object to a SelectedItem component?
I would like to pass some value as a binding object:
data={
(['OPT1', 'Option 1'],
…

GoldenLight
- 199
- 1
- 4
0
votes
1 answer
React Native componentDidUpdate props not connecting to main component?
When trying to add a nice Lottie animation to my Login component, I got stuck because the props inside componentDidUpdate don't seem to be recognised when referenced on the main component file.
'isActive' from 'this.props.isActive'(the Lottie…

Petru Cotarcea
- 3
- 1
0
votes
1 answer
How to get component code in react-native output
I have created button component for my app.
Here is my code

Sagar Kachhadiya
- 1,025
- 2
- 9
- 24
0
votes
1 answer
How to position 2 text components at the end of a view in RN?
I want to achieve this result
But this is the current behaviour
As you can notice both Text components aren't aligned correctly.
This is the code

Amine
- 2,241
- 2
- 19
- 41
0
votes
1 answer
How to fix the behaviour of a custom tabbar in React Native?
I am trying to implement a custom tabbar in React Native.
I've done it before with only 2 tabs and it worked. But now I have 4 tabs and it seems to switch between the first and the last tabs only even when I click the second of third ones.
Here is…

Amine
- 2,241
- 2
- 19
- 41
0
votes
1 answer
How to make component re-rendering in react-native faster?
I am trying to change the style of a component in the sideBar based on the state of the navigation drawer (opened / closed). I am already detecting the state of the navigation drawer and passing it to the sideBar component using props inside…

Amine
- 2,241
- 2
- 19
- 41
0
votes
0 answers
How to create a complex custom progress indicator in React-native?
I am new to react native and I am currently trying to create this progress indicator
I couldn't find any good ressource to achieve this result.
Can you guys provide any guidance with this?

Amine
- 2,241
- 2
- 19
- 41
0
votes
3 answers
How to solve React Native Scroll Animation issue during slow scroll?
I have made an example code here with Snack expo
Animated Header
The issue that I'm having is that my animation is not smooth enough.
It looks like it's shaking.
Demo video YouTube Video
I can't seem to find what's the issue here and also tried to…

Firman Jamal
- 113
- 2
- 12
0
votes
0 answers
React Native - functional component ref in child component
In render() of my RN component class I call functional component A which loads a Carousel. This Carousel in A then calls functional component B in its renderItem prop. B contains a FlatList w ref defined as (this.list = ref)}…

mutable2112
- 439
- 4
- 15
0
votes
3 answers
How to only select one checkbox in a React Native Android app?
I'm trying to set up my first Android app in React Native.
Now there's this card (react-native-component) with multiple checkboxes inside (see code below).
Every time I try to select only one checkbox, it somehow checks all of them.
I know it has…

Splekke
- 81
- 1
- 3
- 12
0
votes
1 answer
Android 7 React Native number of components limit?
I've been making my first React Native app, for now without redux, just RN. The case is on Android 7 it doesn't show a lot of components, but it does on more recent versions of Android and works perfectly on iOs.
Here are screenshots of my problem,…

Alex K
- 173
- 2
- 13