Questions tagged [react-native-component]

67 questions
2
votes
1 answer

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 allow me to create and document components as a…
mustafa1993
  • 541
  • 1
  • 5
  • 17
2
votes
1 answer

Fetching label value of switch in react native

I want to achieve functionality of a checkbox with a switch in react-native, as checkbox isn't supported in ios devices. I am not getting on how can I fetch the label value associated with a particular switch. So, the idea is, I have a bunch of…
Frosted Cupcake
  • 1,909
  • 2
  • 20
  • 42
2
votes
0 answers

Android layout into react native View

I creating an android native module from an existing Java library. This library, make a GLSurfaceView setEGLContextClientVersion(2); setRenderer(new GLSurfaceView.Renderer() { @Override public void…
2
votes
3 answers

How to get callback from child component to parent component in React Native

I have been working on react-native to get the callback from child to parent. Below is the code snippet of my implementation: MainView.js import React, { Component } from 'react'; import { StyleSheet, View, Text, Image, …
2
votes
1 answer

Pass value from custom TextInput

I have a really simple but styled TextInput, declared as an own component. It looks like this: import React from 'react'; import { Text, View, TextInput } from 'react-native'; import styled from 'styled-components' const StyledInput =…
faerin
  • 1,915
  • 17
  • 31
2
votes
1 answer

React Native UI Component

When react native require this native ui component multiple time, starting from the second one, the previous became black. Any ideas? @Override public String getName() { return "JWPlayer"; } @Override public JWPlayerView…
manuelprojects
  • 213
  • 3
  • 10
2
votes
3 answers

React Native CameraRoll.getPhotos API doesn't render the results

Hi I have the following class where I am trying to get the photos from camera roll and display it. class CameraRollProject extends Component { constructor(props) { super(props); this.state = { images: [] }; } …
1
vote
0 answers

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 package.json, example folder and how does a…
1
vote
1 answer

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 block below, you will see the Datatable is showing. What…
Jonas T
  • 2,989
  • 4
  • 32
  • 43
1
vote
3 answers

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= { style:any } const Input = (props:Props)…
1
vote
0 answers

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 to a server. However, I wouldn't like to send…
marmundo
  • 111
  • 6
1
vote
1 answer

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 component that I've created: Card.js import…
1
vote
1 answer

Native component not found in the UIManager

I'm trying to build a react native component, but I'm stuck in follow error: Invariant Violation: requireNativeComponent: "RNMyComponent" was not found in the UIManager. I believe to be in the right path, but still missing something. After so…
Pablo
  • 1,953
  • 4
  • 28
  • 57
0
votes
0 answers

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 "require" function. To access the images, you can…
0
votes
1 answer

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 icon and text to become clickable. Does anyone know…