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

react native : Unable to uncheck checkbox

In my example I present a checkboxes list butI cant uncheck the checkboxes.Now I can only check them but cant uncheck .How should I fix MY code that it will works fine ? ? const [checkList,...

View Article


react native: uncheck of checkbox doesn't works

I really want to know how I can change my sample code so that it is possible to uncheck the checkbox?At the moment I can only check but cant uncheck and I really do not understand where the problem...

View Article


TypeScript - is it possible validate string types based on pattern matching...

Consider the following component, which uses a library called styled-components to create a prestyled Text component:const StyledText = styled(Text)` font-family: Roboto; color: ${(props: ITextProps)...

View Article

React Native FlatList: I have ListHeader Component with 3 items. How can I...

React Native FlatList: I have ListHeader Component with 3 items. How can I make it so only 2 of those items are sticky?I wanted renderTitle() to be the only item in the ListHeader prop to not stick...

View Article

DraggableFlatList onRef getting a wrong type with Typescript

I am using react-native-draggable-flatlist in ReactNative. I am interested in the ref to FlatList so that I can perform a scrollToIndex on it. Using the following code:import React, { useEffect,...

View Article


eslint vs tsconfig in react-native

Does anybody explain the difference between eslint and tsconfig for me?module.exports = { root: true, extends: '@react-native-community', rules: {'sort-imports': 'error', },};As far as I know, eslint...

View Article

React Native i18next.changeLanguage is not changing app language

I am trying to implement i18next library to change React Native app language, but I am not able to translate it. enter image description hereI have created i18n.tsx file.import i18next from...

View Article

How to handle background updates and form input in React?

I am trying to figure out how to set up the contexts to handle background updates and also be able to handle form input. Here's what I did but I know it's wrong because I have the issue where the form...

View Article


Nesting multiple Stacknavigations in react-native

i'am writing an expo (react-native) application using typescript and functional components. I have a very nesting stack navigation.App: { NavigationConatainer: { DrawerNavigation: { StackNavigator1: {...

View Article


RN FlatList with Typescript and Styled Components

SO community,I can't figure out the correct type definition for an RN FlatList styled with Styled Components in TypescriptSo I have type IProduct like thatinterface IProduct { id: string; name:...

View Article

expo + jest: unable to run test for a component containing icon from...

In my react-native expo app, I've successfully setup jest and wrote a test. But when I run it, I get the following error:● Test suite failed to run TypeError: Cannot read property 'default' of...

View Article

Loading @polkadot packages in react native app with expo

I am currently working on a react application to complement a web application, and have been tasked with implementing an self-sovereign identity solution using the Kilt.io protocol. This worked fine...

View Article

React Native Image source prop type?

I have a BackgroundImage component that receives a prop from its parent component:<BackgroundImage backgroundImage={require("../../assets/png/backgroundImage1.png")}>And the BackgroundImage...

View Article


App.tsx is called when I am navigating between screens

I have an odd issue: I will explain. When app is opened an initial API call is made to the backend exchanging various bits of encrypted data and information. Then I get back a user unique identifier,...

View Article

SectionList Input section does not refresh on state change

Following is my React Generic Component. I have tried to simplify it but It is still not too short. Apologies for that. My intention is to create an editable menu with attributes and their values which...

View Article


Expo Typescript won't build the project, no outDir is produced

I'm trying to get my typescript project to build. It has built successfully in the past with the same settings, but now it's not building even though it isn't showing any errors. I run:npx tsc -p...

View Article

Why does my React Native app build successfully despite TypeScript compiler...

I've recently started using TypeScript with Expo. I've done all the linter/formatter integrations like typescript-eslint so I can catch most of the errors during coding. To check if the code compiles,...

View Article


Bottom navigator not switching tabs in React Native

Okay so I am new to React Native so I believe that I just have a structural issue but I can not seem to realize what I am doing wrong.I am trying to have 4 tabs but when I click on each tab it is not...

View Article

Image may be NSFW.
Clik here to view.

Mocked Async storage test with jest fails, received null

Hello all I am new in testing, I am just trying to test async storage value, it's set to 25 as you see;This is test I have written;test('can read asyncstorage', async () => { let val = await...

View Article

Image may be NSFW.
Clik here to view.

Mocked Async storage test with jest fails, received null, what is correct way...

Hello all I am new in testing, I am just trying to test async storage value, it's set to 25 as you see;This is test I have written as below;test('can read asyncstorage', async () => { let val =...

View Article
Browsing all 6365 articles
Browse latest View live