Questions tagged [react-native-component]
67 questions
0
votes
1 answer
React Native: how to build a list without a defined item size? (Item size depending on the content inside it)
I am developing a feature similar to a comment screen. As we know, comments have different lengths in which often require bigger or lesser space to contain itself inside a list item.
But apparently, inside my flatlist I am out of ideas to keep the…

Ryan Wang
- 418
- 7
- 23
0
votes
1 answer
How to pass props with value (image index) from component to main view. Building Image gallery in React Native
I an trying to pass the Image index from "Card.js" component to change the background/cover image dinamicaly when the user press the Image from the Array.
In my Card.js I pass the array of images like this:
function Card({
title,
onPress,
…

Marius Geageac
- 21
- 4
0
votes
1 answer
How to pass the selected date from DateTimePicker component that is encapsulated in Formik in React Native?
I am having trouble passing the selected date in React Native component that is encapsulated with Formik. It seems that the value is not passed even though the field value changed and the console log shows the selected date. See image. Please help…

pyrochan157
- 49
- 4
0
votes
1 answer
React Native: onPress() is being called infinitely at render of component and won't work when I press the icon
Below Is some of my code. It seems my component is rendering infinitely, and the onPress() function on the icons is being called every time it renders, but won't work when I actually click on the JSX element. I have tried binding the function using…

DIllon marks
- 59
- 1
- 6
0
votes
1 answer
Component call does not display value
I am building a picker with data taken from a database. It works fine, but I can't send the value I have stored in auth.token (in the useAuth component) to the URL. I have tried in many ways and I am not able, can you tell me how I…

Francisco S
- 109
- 7
0
votes
1 answer
why is my flatlist not showing react native
I created a FlatList filled with data from my file filmsData.js, but it isn't showing.
I feel like I did everything like my lesson explains so I dont understand why it's not showing.
class Search extends React.Component {
render() {
return (
…

Dayvin Zahout
- 11
- 2
0
votes
1 answer
How to fill progress at one or more specified positions on a circle in React Native
How can i assign one or more progress on circle progress as shown below
I'm using the library react-native-circular-progress
Current:
Expect:
Thanks all !

a programer
- 77
- 7
0
votes
1 answer
React Native java module NativeEventEmitter is not emitting events
I am converting the following module to Java: https://github.com/dehy/react-native-radio-player
So I have created a new module inside my repo. But I am failing at receiving events from ExoPlayer.…

arbel03
- 1,217
- 2
- 14
- 24
0
votes
0 answers
Custom TextInput component with Ref's in react-native
I have a problem in react-native.
my application has many screens and forms.
I need to create TextInput component for this style and keep the program in clean code.
this is my TextInput component:
import React, { Component } from 'react';
import {…

fatemeh kazemi
- 516
- 6
- 10
0
votes
1 answer
How to add a screen switcher component in react native
Being a newbie to the field of app development, I actually don't know the name of this UI component .
This component basically act as a switcher between two screen, which shows up Explore screen when Explore is clicked and My Community screen when…

curious
- 87
- 6
0
votes
1 answer
React-native adding components to array and accessing them
I'm trying to make some sort of quiz, and I want to have all the boxes in a FlatList. I want all of them to be hidden, except for the first one, and that when you answer it the next question appears.
Here is my code:
const TYPE =…

Thomas W
- 32
- 5
0
votes
2 answers
React Native Component Exception
I got this error message while working on the other file
Error: Couldn't find a 'component', 'getComponent' or 'children' prop for the screen 'Store'. This can happen if you passed 'undefined'. You likely forgot to export your component from the…

Hanter On
- 1
- 1
0
votes
0 answers
react-native-single-choice usage without using hooks
I want to use this library react-native-single-choice but in a simple class component. I am not using hooks so I am kind of not able to use in my class.
Link to the documentation:
https://www.npmjs.com/package/react-native-single-choice

sver
- 866
- 1
- 19
- 44
0
votes
0 answers
React Native including component inside a ScrollView not working
I'm building and app where I'm trying to include a component named Header.js inside navigation forlder. I'm working with functional components throughout the app. Also the images are not working. I'm new with React Native.
Here's the error
Unable to…

Nargesh Rana
- 134
- 1
- 15
0
votes
1 answer
How to pass data between same level classes/component without using Navigation in React Native?
Pass data from one class to another class that resides on the same level without navigating in react native.

Saad Arshad
- 38
- 1
- 5