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

Error when using write() with "react-native-ble-manager" library with status=3

So, I'm trying to send data to BLE device.My phone and BLE device are already connected.My function:const sendCom = async () => { const data = utf8Encode('1') // convert data to bytes const service...

View Article


How to append RTK Query response with previously cached data

Using a RTK query, I'm attempting to add infinite scrolling to a Flatlist. How do I integrate the new response with the data that was previously fetched? I must also replace the existing data with the...

View Article


Passing in a variable as Tab Screen component

I want to be able to use data collected from an API and stored in JSON to be used as component names for my Tab Navigator.Example:const InstructionsTemplate = ({ navigation, route }) => { ...}const...

View Article

Image may be NSFW.
Clik here to view.

React Native 0.71 Typescript Prettier Error

App is run without any problem but This red warnings disturbing me. How i can solve it?

View Article

React Native: Custom Component for FlatList Content Container

Is there any way so that I can add a custom component for FlatList items?I want to "wrap" my FLatList items with custom component equivalent to this<ScrollView pt={8} px={16} pb={128}><Card...

View Article


Invariant Violation: "main" has not been registered. This can happen if:...

I'm trying to load the app I'm working on (react native in my android device) with the command "yarn react-native start", but when the bundle starts loading, the app crashes, showing me this...

View Article

Better way of defining types for 'navigation' object, when using Stack...

I'm having some trouble with modularization for the prop types, when using react-navigation.My problem is:The React Navigation doc Typescript section suggests creating the types for each screen props...

View Article

Image may be NSFW.
Clik here to view.

['type aliases' can only be used in a .ts file]

I use command react-native init "name project" then open vscode appear to have error message code. (image)

View Article


TypeError: undefined is not an object (evaluating...

return (<SafeAreaProvider><NavigationContainer /*onReady={() => SplashScreen.hide()}*/ ><Stack /><AlertDialog /></NavigationContainer></SafeAreaProvider> );I...

View Article


KioskMode in React Native and Android 4.4.4?

How can I set up KioskMode using ReactNative in a tablet with Android 4.4.4?I'm still able to exit the app pressing the Home Button and interact with the StatusBar swiping down the area above the...

View Article

React-native-geolocation with maximumAge: 0, is still getting cached location

Yo guys,I'm using Geolocation from 'react-native-geolocation-service' library and the details are as follows. The problem I am facing is that android & iOS is returning the cached position. I have...

View Article

Image may be NSFW.
Clik here to view.

TypeError: (0 , _codeSigningCertificates).signBufferRSASHA256AndVerify is not...

Can't launch my app after a few switches between commits. Expo go shows the error in consoleTypeError: (0 , _codeSigningCertificates).signBufferRSASHA256AndVerify is not a function (Expo Go)and on...

View Article

Clear inversify-js container and resolve new service instances

I have a react-native application frontend using inversify-js.I've structured some service classes to use IOC (using an inversify container), such services intended to be shared as just one singleton...

View Article


why my react native become .tsx instead .js

so after installing react native using npx react-native init MyProject the project is running and open in emulator but the app file is not app.js instead app.tsx,file strcutureThe question is i am new...

View Article

How to invalidate useQuery cache from another component?

I have a parent component which needs to invalidate the query cache of a child component:const Child = () => { const { data } = useQuery('queryKey', () => fetch('something')) return...

View Article


After clicking the give up button, the swipe list on the back remains open

<PressableOpacity onPress={() => { AlertDialog.dismiss() }} style={{ height: responsiveHeight(40), width: responsiveWidth(100), justifyContent: 'center', alignItems: 'center', marginHorizontal:...

View Article

Image may be NSFW.
Clik here to view.

My Expo project suddenly start showing Typescript missing, install. Whereas I...

I am new to react-native and expo stuff. I was working on an application that worked fine until I installed react-native-wifi-reborn.I was following this article since I wanted to connect to wifi from...

View Article


Check whether any apps are opened on a user's iOS/Android device with React...

I am making an app that requires me to know whether the user has opened any app on their mobile device.I don't need to know which app they open, I just need to be notified at the time that this...

View Article

React Native 0.71 importing files causes syntax error

I started fresh React Native project. When I add a new folder to project like components folder, if I import file in that folder I got syntax error and saying that none of these file exist. I have to...

View Article

Why is the behavior of `jest.useFakeTimers` different when called inside vs....

OverviewI encountered different behaviors of jest.useFakeTimers when it is called inside beforeEach versus called outside.Reproducible Examples// Foo.tsximport * as React from 'react';import {View}...

View Article
Browsing all 6290 articles
Browse latest View live


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