73
questions
0
votes
1
answer
42
views
React Native Component Position
I create a button component in react native. It is on the top side of screen but I want to set it at the end of screen.
<View style={{ marginHorizontal: 52, marginBottom: 23, }}>
...
0
votes
1
answer
228
views
React Native Component moves up with keyboard
I create a custom bottom tab bar and fix it at end of screen using
position: 'absolute', and bottom: 0,.
I also have a textinput for search. When I try to type something in search, keyboard appears ...
1
vote
0
answers
72
views
How to Pass React native components(like View,Button,Text) to native iOS(Objective-c)
I have one View in react native,
Now to I want to pass that View into native iOS, but I don’t know is it possible or not
And if possible how to implement that
I have Implemented some code, Here I ...
0
votes
1
answer
47
views
My text is not being displayed when using props (React Native)
Components file:
function GoalItem(props) {
return(
<Text style={Styles.prop}>{props.text}</Text>
);
}
export default GoalItem;
App file:
<FlatList data={(list)} ...
0
votes
0
answers
146
views
How to extract a component from a jotai Atom of string type in react native
I have a JOTAI atom object which has a key names Component with string value as '<ActivityIndicator>' How can i render this component in other component the value is printing as plain text, not ...
0
votes
0
answers
336
views
Bug in React Native app with Native Android Components
I am a beginner and I have been trying to develop a React Native which uses Android native component. As a start, I created a fresh React Project. Then in the directory android/app/src/main/java/com/...
1
vote
0
answers
466
views
How can I retrieve the project directory path and utilise it to display an image in a React Native application?
I have a collection of images located in the assets folder within the Android directory, as depicted in the accompanying screenshot.
I would like to utilise those images without relying on the "...
0
votes
1
answer
28
views
Problem with lining up contents: react native
I'm currently having a problem with the clickable size of a reusable button which includes an icon and text. When I run this code it seems like the entire row becomes clickable when I only want the ...
0
votes
1
answer
177
views
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, ...
2
votes
1
answer
671
views
React Native Android build failing with 'compileDebugJavaWithJavac' on several packages
I've been working in the same React Native project for months and recently the Android build has started failing. To my knowledge I haven't changed anything about my development environment and I ...
0
votes
1
answer
124
views
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 ...
0
votes
1
answer
189
views
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 ...
1
vote
1
answer
513
views
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 ...
0
votes
2
answers
2k
views
React Native TextInput onFocus does not allow onPress of other child components
Nested TextInput component does not allow other components' onPress function to be called. Only when the TextInput is not focused, the onPress works fine.
React Native Version : 0.66.3
Here is my code
...
0
votes
1
answer
55
views
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 ...
0
votes
1
answer
49
views
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 ...
0
votes
1
answer
2k
views
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 !
1
vote
0
answers
89
views
How to create an UI toolkit react native library
I have created a react native project and I want to save my UI components on a separate library for reusability. I have created an library mentioned here on the docs but found no proper guidance about ...
0
votes
1
answer
1k
views
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. ...
0
votes
0
answers
781
views
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:
...
7
votes
1
answer
2k
views
Google Maps SDK for Android: Smoothly animating the camera to a new location, rendering all the tiles along the way
Background
Many similar questions seem to have been asked on SO before (most notably android google maps not loading the map when using GoogleMap.AnimateCamera() and How can I smoothly pan a GoogleMap ...
1
vote
1
answer
1k
views
React Native Datatable doesn't show after moving the fragment into Component
I've created the following component. React Native Paper Datatable rows aren't showing after moving it into component and linking it to json loop.
If we comment " and uncommented the commented ...
0
votes
1
answer
521
views
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 ...
4
votes
2
answers
2k
views
How to use Ref in a component that is forwarding its ref in React Native
I have a react native custom input component and I'm successfully forwarding its ref to a parent component.
Now, I also want to refer to the input in the child itself, How do I do this??
//my ...
2
votes
0
answers
344
views
Expo standalone app crashes when opening a screen uses react-native-maps component
I am developing an Expo Application that uses react-native-maps. the application works absolutely fine when I open it in Expo Client. but android "APK" build of standalone app reloads every ...
0
votes
1
answer
165
views
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.
...
0
votes
2
answers
363
views
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 ...
2
votes
3
answers
11k
views
Props in custom components React native + Typescript
I've got a problem with access to onChangeText in my custom component.
Here is the code of my component:
import React from 'react';
import {TextInput, StyleSheet} from 'react-native';
type Props=
{
...
-1
votes
3
answers
3k
views
How to auto hide and show component in react native
In my home screen I want to auto hide my header in 2 seconds, then I will have a button to show the header when pressed. I have tried with HomeStack.Screen but could not achieve it, I have to create ...
0
votes
0
answers
54
views
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....
0
votes
0
answers
108
views
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 ...
2
votes
3
answers
2k
views
Showing different component after every certain number of items in FlatList
I am using FlatList to show my card components in my app.
And I want to show another component (like an ads or an announcement component) after certain numbers of cards in the list.
As an illustration,...
7
votes
2
answers
6k
views
How do you make rounded corners on a tab bar on React Native with React Navigation?
Stack:
React Native
React Navigator
Core components only
I have this style on TabNavigator.tsx:
const styles = StyleSheet.create({
tabStyle: {
backgroundColor: colors.background,
...
0
votes
1
answer
340
views
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.
0
votes
0
answers
208
views
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 ...
0
votes
1
answer
451
views
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 (
<...
2
votes
1
answer
305
views
I have a list of items which i want to pass navigation to it using react native navigation
I have a list of items which i want to pass navigation to it using react native navigation, here is my main code,
import React from 'react'
import { StyleSheet, Text, View, TouchableOpacity, ...
0
votes
1
answer
296
views
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 ...
-1
votes
1
answer
127
views
How can I convert stateless function to class component in react native
I am new in react native, I have been looking for how to convert this function to a class component in react native. Please I need help to convert the code below to react component.
import React from '...
0
votes
2
answers
4k
views
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 ...
2
votes
1
answer
384
views
How to export React Native components created in storybook for it to be used in actual app?
I understand we can create and test React Native Components in isolation in Storybook. But how do we export/publish the components to integrate in our app?
In React -
I used react-docgen that will ...
0
votes
3
answers
1k
views
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 ...
0
votes
1
answer
832
views
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.
'...
1
vote
0
answers
26
views
Send a interaction to a server only after user stops to interact with numeric input
I have a react native app. This app contains a personalised numeric component. I'm using this solution. Every tick fires a onChange property. This onChange fires a function which send component value ...
1
vote
1
answer
892
views
React Native Reusable Card Component won't Visualize as expected
Hello there I'm new to react native. I'm trying to create reusable component, not only card component, maybe in future will create other reusable components. Below is the code example of reusable card ...
0
votes
1
answer
139
views
How to get component code in react-native output
I have created button component for my app.
Here is my code
<TouchableOpacity
style={{ width: 200, height: 40, backgroundColor: '#000', justifyContent:
'center', alignSelf: 'center' }}>
...
0
votes
1
answer
671
views
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
<View style={{ flexDirection: 'row', ...
0
votes
1
answer
140
views
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 ...
0
votes
1
answer
404
views
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 ...
0
votes
0
answers
360
views
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?