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

React native Typescript RouteProp: does not exist on type...

I am using react navigation props name RouteProp in my app. My app works fine without Typescript error. I am trying to test my component, does it render the data properly. In my test suite I import the...

View Article


If I set "variant" oprional, I get "Type 'undefined' cannot be used as an...

In typescript react-native project, this is component that I set: type Variants = "body" | "label" | "caption" | "error" | "hint"; interface TextProps { theme?: DefaultTheme; // variant?: Omit<keyof...

View Article


using dispatch on react

I am new to react and I'm trying to create a register and login page with react-redux and dispatch using the mern stack.When I am calling the method the function did not run.I have a file for the login...

View Article

Type Safety for Testing React Navigation with React Native

NAVIGATORexport type RootStackNavigator = { Welcome: undefined List: undefined}const Stack = createStackNavigator<RootStackNavigator>()const { Navigator, Screen } = Stackconst Navigation = ()...

View Article

Styled-components theme with react-native testing-library

I've been stuck for a while trying to figure out exactly what I'm doing wrong here and I feel like I've tried every solution that I've found and it doesn't work. To describe what's happening, I made...

View Article


Using DrawerNavigator alongside stack navigation on react native

i'm currently using a stack Navigation on my app, but i want to add a Drawer menu to it.When i try to add i get a conflict issue with the current Navigation Container on my app.Where shoud i put the...

View Article

typescript: Property 'label' does not exist on type 'never'

How can fix this error :Property 'label' does not exist on type 'never'<Picker dropdownIconColor='black' mode="dropdown"> {stateList.map(option => <Picker.Item label={option.label}...

View Article

Javascript Library with typings is Not a Module (React Native)

I'm trying to integrate a Javascript Library (Microsoft Playfab) into my React Native app as per recommended here. The library comes with typings and has the structure as shown here. I have a file...

View Article


Error when using toggleDrawer navigation.ToggleDrawer is not a function

I'm currently using stack navigation on my app, but i decided to increment a Drawer for a user's menu.I managed to insert the Drawer in my pages, but some of them are a MapView content, so the user...

View Article


Native code method returns undefined instead of string

I have a simple test react-native project running where I want to run some native code. I followed the dev guide and I have a module and a package class in my android project and I linked it in...

View Article

Unknown Option error from Babel in React-Native app

I am building a react-native app with typescript in order to learn react native. Once I run the app with expo start and try to run on emulator I get this error:index.js: [BABEL] ......../index.js:...

View Article

How to describe the ScrollEvent type in React-Native(-Web) via typescript?

I can't figure out how to describe the ScrollEvent type in React-Native-Web but I suppose the same is actual for the React Native?To be honest, it's always a bit hard for me to correctly describe the...

View Article

React-Native how can i return my json data to my prop?

I have a component and that component should send a json url to my function. Then that function will fetch it and send back it as props so i can see data in props. But even i take data true, when i...

View Article


How to create a async and await loop until get the result using typescript?

I have to do async / await loop to until get the particular value using typescript, react native. The below are the code let expData = <this.props.socketvalues>;expData in N number of attempts...

View Article

How to add SectionList 's sections in React Native from an array

I have an array of objects called movies (const movies = movie[]). A movie has the following properties: movie: { name: string; description: string; date: Date; duration: number }I want to use a RN...

View Article


Javascript change property inside object within array logic

case ActionTypes.ADD_TO_CART: { var newOrders = state.cartItems.slice(); let updatedIem = state.cartItems.find(i => { if (i.id === action.product.id) { return action.product } else { return null }...

View Article

React How can i make new array when i choose some item from picker?

I thinking for few days but cant realize how can i make it. I have 4 json data and 4 picker.Its for city,district,village,neirborhood. In first i must choose city then in second picker it must show...

View Article


How to authenticate user offline with Firebase in React-Native?

I am trying to use Firebase authentication offline on my React-Native App. But I get:auth/network-request-failed [auth/network-request-failed] A network error (such as timeout, interrupted connection...

View Article

Arrow function logic in React Native CLI project

I created a new React Native CLI project and was thinking to convert the App component to a class based component to fix a hot reload issue when using react-navigation.But I don't understand the logic...

View Article

can't synchronise the updated Products List array in zustand?

I want to explain the use case i have so you can understand it wellI have Cart & Products when the user adds the product (product_id = 1) twice to the cart and the product has the same options...

View Article
Browsing all 6287 articles
Browse latest View live


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