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

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


Image may be NSFW.
Clik here to view.

Cannot create a React Native + TypeScript app by following official directions

With the following context:$ node -vv14.8.0$ npm -v6.14.7$ yarn -v1.21.1$ tsc -vVersion 4.0.2and following the instructions here: https://reactnative.dev/docs/typescriptI tried to create a React...

View Article


React Native: I want to make an animation for a View, it should rotate 90deg...

I want to make an animation to rotate 90 deg up or down if an icon from the div it's pressed.It should rotate down if show is false, and viceversa.This is my code:const [show, setShow] =...

View Article

Hooking up React Redux to a Component in Typescript

I am looking to hook up React Redux to my component in typescript. I am using these docs as a template.I have the following type defining the state I have in the Redux store (there is only one):export...

View Article

How to stop React Native re-rendering?

I'm still learning to use React Native and runnig into an issue with the stack size being exceeded but I'm unsure why. Looking at other posts I see it must be that the screen is being rerendered too...

View Article


Image may be NSFW.
Clik here to view.

React Native: Can someone help me make a custom alert?

Hi can someone help me make the timeout alert box from the image below? It is the Refreshing Alert Box from Expo Mobile App, which appear when you save the code.

View Article

Image may be NSFW.
Clik here to view.

Trouble fetching (useValue) from 'react-native-redash'‏

I'm facing a problem here, it can't fetching (useValue) from 'react-native-redash', and I tried a lot for two days and I couldn't solve it.

View Article

React Redux Undefined Object Passed into the Reducer

I'm working on my first React Redux application in typescript and I have a peculiar error in that the object that the reducer is receiving is 'undefined'.types.ts//Action typesexport const...

View Article


Execution flow in react native after navigation.navigate

Need suggestion and advice,I am using the below 2 lines of code in react native expo component,this.props.navigation.navigate("App"); patchUser(this.state.dataSource.userInfo.username,...

View Article


How to use react-native-testing-library getByRole

I'm trying to use getByRole in react native testing library but can't for the life of me figure out the syntaxComponent in question-<Text accessibilityRole={'button'} accessibilityLabel={'upvote...

View Article

I have a React-Native, Typescript project that works just fine but jest tests...

My jest tests run/pass until I start to import modules from my local project. I'm sure there is some path/setting I'm missing...React native builds and runs without a problem just running tests is...

View Article

TypeError: X is not a function, 'X' is undefined

I'm trying to implement the login functionality in a react native project but the following error occurs:[TypeError: signIn is not a function. (In 'signIn({ email: data.email, password: data.password...

View Article

Firebase Cloud Functions Emulator Issue

I am using React Native with Firebase Firestore & Cloud Functions. In oder to test those functions locally, I use the emulator suite. -Application folder --node_modules etc. --react native stuff...

View Article


React native context and deprecated super usage

I've been away from react native programming for a week and when I got back, after some VSCode updates, I have noticed that many of my super(props) calls in class constructors are now marked as...

View Article

React Navigation V5 + Typescript Error: Property 'fullName' does not exist on...

My Goal:I'm trying to add Typescript typings, but having an issue with route.params.fullName. When I console.log(route.params), the object { fullName: 'John Smith' } is logged. Why is Typescript having...

View Article


Image may be NSFW.
Clik here to view.

React Native - Typescript issue

After a transaction I did, I started getting an error like this. How can I solve the problem?I wrote the code in React Native as typescriptThe file supporting useScrollHandler.ts in the lib folder in...

View Article

React: Build Connections Among Component

I am a beginner of React JS. Messing around to achieve VanJS event listeners.For layout, I decide to store things like a panel, a button as individual component.Now, I have a component Movie and...

View Article


Read JSON from local file but error on map function

I followed a few articles on how to read json data from a local file in React and they are recommending using map function. Like https://morioh.com/p/316b1492cfdaI am getting an errorProperty 'map'...

View Article

cannot read property "toFixed" of undefined

I have the following block of code:export interface Record {Percentage_Emissions: number;Percentage_Emissions_Previous: number;Vs_Previous_Year: number;}const Info = ({ data}: { data:...

View Article

Accessing the Wrapper Component's Props in a HOC to return a WrappedComponent...

I am writing a higher order component that essentially takes in a wrapped component and uses the wrapped component props to define a set of functions and then add these functions to the props of the...

View Article
Browsing all 6214 articles
Browse latest View live


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