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

Is there a significant difference between React-Native useEffect [] and a...

I am building a React-Native SDK library based on Swift/Kotlin modules, and I want to deliver the best UX to those, who will use it.I could not notice how AppDelegate didFinishLaunchingWithOptions is...

View Article


Image may be NSFW.
Clik here to view.

React Native Paper the List.Accordion I can put the Icon

ObjectiveI am using the library react-native-paper and I am using the List components, but in the List.Accordion appears one strange image at the right position, I would like to put an icon arrow down...

View Article


Property 'uri' does not exist on type 'ImageSourcePropType'

I'd like to wrap the image component of react-native. However, an error message appears saying that 'uri' Property does not exist. Why does this happen?import React from 'react';import { Image as...

View Article

Image may be NSFW.
Clik here to view.

flatlist extends out of the screen

I have a screen that looks like this:return (<SafeAreaView style={styles.safeAreaViewContainer}><View style={styles.container}> ....<View style={styles.listContainer}> {data...

View Article

Flow complains about untyped import

I'm starting out on a React Native project that uses react-native-geolocation-service to get the user's GPS location, but Flow is complaining that the library is untyped. The library has Typescript...

View Article


`Cannot use import statement outside a module` when combining RN and ts-node

I created a small CLI tool to automate some process on my React Native project.Recently I had to update the RN from 0.61.4 to 0.63.2 to address some iOS issues.Since this update, the CLI is not working...

View Article

how to type event in react native with defaultPrevented?

i am getting an event object from react navigation with its emit function. e.g.: const event = navigation.emit({ type: "tabPress", target: route.key, canPreventDefault: true, });the event type from...

View Article

(ts / React-Native) How to change an image & mp3 each N seconds with timer?

I'm using ts for React Native and I want to implement screen changes an image and mp3 files each seconds with timer so how can I do? I am gonna very appreciated that anybody helping me!

View Article


Functions are not valid as a React child. This may happen if you return a...

ERROR Warning: Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it.Hi all, I'm...

View Article


getting Property 'value' does not exist on type 'number'.ts(2339) on onChange...

Hey im relatively new to typescript. Its telling me there's no value property on the e.target attribute of my onChange function. Im just trying to have it update the state of the userObj, allow me to...

View Article

How to use prop-types as type definition in typescript?

Situation:Consider having the myTypes constant holding prop-types (written somewhere in a file called my-component.js), like below:import React from 'react'import { View } from 'react-native'import...

View Article

Getting "Invalid call" when using require with Typescript and Expo

I am trying to play some audio in a react-native app created with the expo-cli.The code is written in typescript and the offending code looks like this, taken from the expo.io documentation:import * as...

View Article

how to pass ref from parent to child Touchable Opacity in react native?

i have a transitioning ref in a parent Transitioning view i want to pass in a child:const transition = (<Transition.Together><Transition.In type="fade" durationMs={300}...

View Article


type for native-base-theme material

https://docs.nativebase.io/Customize.html#theaming-nb-headrefI am using a custom native-base style theme according to the link above.import material from './native-base-theme/variables/material';import...

View Article

A computed property name must be of type 'string', 'number', 'symbol', or...

I am using redux-saga and redux-actions with Typescript, like this: const moviesReducer = handleActions( { [actions.fetchMovies]: (state) => ({ ...state, details: {...initialState.details}, }),...

View Article


What is the meaning of this code in React Native and Typescript?

I have read some codes of my company's project and see something strange and do not know what it is.What is the meaning of the last '&' and an object { invalidMail?: string, ... }?const...

View Article

React Native: Array.map()-based rendered components not updating on state change

I have a few components being rendered from an Array.map() that won't update even when the state (pertaining to said array) changes, and I have no clue why this is.Home (main component) :import React,...

View Article


Logout on Apollo-Client

I'm developing an app using react-native with Expo that interacts with a GraphQL Backend using Apollo.The authorization between Front and Back is done with JWT token on header and it's working fine. On...

View Article

How do I make thefun.thefun a function?

Technology:React-NativeDesired Result:I'm trying to pass a function between components. I want theFun.theFun() to call but it doesn't run:Component ExceptiontheFun.theFun is not a function. (In...

View Article

ApolloClient client's Type

I have a function where I pass the client as a parameter and delete the token from my app etc: const logOut = async (client: ApolloClient<unknown>) => {...};return (<ApolloConsumer>...

View Article
Browsing all 6214 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>