Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Browsing all 6287 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

React Native: Flip card animation always shows the same side of the card

I am new to React Native. I tried to create flip card animation and I was following a tutorial, and created the animation but it shows only one side of the card when the animation ends. I think the...

View Article


How to pass props to StyleSheet on custom view in React Native?

So, I have a custom view. On that view, besides taking the children components, I also wanna take backgroundColor and some other StyleSheet property so I can style it depends on the screens.This is the...

View Article


React Native issue : [Unhandled promise rejection: TypeError: f is not a...

I am trying to make a login system using states and fetch so that the user can receive his valid token and then put it in storage with Async Storage.I am still in the phase of communication with the...

View Article

How to called async function in useEffect after submiting in react native?

I would like once the user click on the submit button for the whole "page" to reload and the useEffect function to be called. The current behavior is that when the user clicks the submit button, the...

View Article

When i try using nested navigators it doesn't work on web (Reactive Native)

I'm new to react native and started learning about nested navigators.I tried to have the drawer and the stack navigator at the same time, but when i try it only works when i see the project on mobile,...

View Article


How to pass props to StyleSheet in React Native using TypeScript?

I wanna create a custom button component that can pass props to the StyleSheet. At this project, the props I wanna send is the hexcode so the component can have different colors based on the color...

View Article

react-native types file appears to not have the new AccessibilityInfo types?

I am using react-native 0.63 and I am using AccessibilityInfo.fetch() which is now deprecated. I am trying to update to AccessibilityInfo.isScreenReaderEnabled() however i am getting an issue with my...

View Article

Property 'Ripple' does not exist on type 'typeof...

I'm trying to create a button using TouchableNativeFeedback but I ran into an error. This is my code:export const Button = ({props}: Props) => { const [rippleColor, setRippleColor] =...

View Article


Cannot see FlatList inside Modal

Hi i've got a problem with seeing names added to list. Before using Modal everything works fine, but after I use it, after pressing "+" button, nothing happens. I mean I cannot see names in...

View Article


Image may be NSFW.
Clik here to view.

React Native: Flip card animation doesn't work in functional component

I am new to React Native. I tried to create flip card animation and I was following a tutorial, and created the animation but it shows only one side of the card when the animation ends. I think the...

View Article

Unhandled promise rejection: Error: Invalid hook call. Hooks can only be...

So, i have this component SidebarMenu from the drawerContent of Drawer.Navigator const SidebarMenu: React.FC<SidebarMenuProps> = (props) => { return (<View style={{ flex: 1...

View Article

React Native. How to get user local authentication whenever the app comes...

Well, I can`t find anything like this on the web, so I am hoping someone can help me on this one.I`m creating a bare react native android app, and I need to check for the user's Local Authentication...

View Article

How to use a TFLite model on a javascript program?

I have a program I'm working on that uses JavaScript (or typescript and react native, more specifically) to classify images taken by the camera or selected from the device's gallery. I have a TFLite...

View Article


ReactElement type casting

This is more of a Typescript and React question but for full disclosure, I'll mention that I ended up here while trying to create a custom header using react-navigation.I have a simple ImageButton...

View Article

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={...

View Article


Does setState or dispatch (useReducer hook) make component re-render before...

I realize a problem when using useState and useReducer hook that any lines of code after the update state function (setState, dispatch) will be called in the next re-rendering (with its previous state...

View Article

React Navigation route.params typescript

I'm creating a Expo managed React Native app with TypeScript and having some problems with React Navigation and TypeScript.I want to specify the icon for the Bottom Tab Navigator on the Tab.Screen...

View Article


Type '(text: string) => void' is not assignable to type '() => void'

I'm creating a custom component for TextInput. But I've got a problem when I try to pass a function prop to the custom component. This is the code// Screen.tsxexport const RegisterScreen = ({props}:...

View Article

Check with TS that both optional params either passed or undefined

I'm writing an app with React native and Typescript and I have a question.Let's image we have a simple component with three properties, one required and two optional:interface Props { requiredProp:...

View Article

How do I build apk from edited source?

I just fixed some-how problem with expo start, but now I want to build the app from this source code using gradlew assembleRelease, after entering command I get this error ::ReactNative:Unexpected...

View Article
Browsing all 6287 articles
Browse latest View live