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

Warning: Can't perform a React state update on an unmounted component React...

I don't know why I'm facing this issue. If anyone knows how to deal with it so please help. Thanks in advanceWarning: Can't perform a React state update on an unmounted component. This is a no-op, but...

View Article


Rendering random array element from state (React Native)

I'm trying to render a random array item from state so that (e.g - [0] might change to [2] on reload.]Here is what I tried so far, any tips or ideas please?here is my state: state = { randomItem:...

View Article


YouTube API get video url is missing url_encoded_fmt_stream_map and undefined

Restful Infourl: https://www.youtube.com/get_video_info?video_id=${videoId}&el=embedded&ps=default&eurl=&gl=US&hl=en method: 'GET', headers: { 'Content-Type': 'text/plain' }...

View Article

Use yield inside of setTimeOut in redux saga

In my react project I have the following code. export function* onDisplayAlert({ payload }: any) { payload.id = getUniqueID(); yield put(setAlert(payload)); yield setTimeout(() => { yield...

View Article

React + TS: How to call a method from outside of a React Functional Component

Im wondering how I can call a method from outside of a React Functional Component. I wrote the function GetUsedLockers() which gets all the used lockers and returns amount. Now I want to call this...

View Article


Couldn't find preset "module:metro-react-native-babel-preset" relative to...

I'm trying to run my test suite but I am getting the following error:Couldn't find preset "module:metro-react-native-babel-preset" relative to directory "/Users/dan/Sites/X" at...

View Article

Unable to run my Expo app on LAN React Native

I've updated my expo version to the latest. but unfortunately I don't know why my LAN is not working and expo. I've already tried lots of things example. expo r -cDelete node_modules and then npm...

View Article

React Native Datetime Android Picker Toggle Issue

I'm having an issue with the Android Picker from the React Native Datetime Picker library. This is also my first time using Typescript, but I can't figure out why my Android Picker requires me to press...

View Article


Why can't I use StyleProp on my own component

I'm using TypeScript/Vscode for coding my React Native app. I want code completion on my custom components for style just like React Native's own View component does.style prop View is defined like...

View Article


How to declare react navigation argument with typescript?

I want to use typescript with my react hook component.I use react-navigation for my router.Create project with npx react-native init MyTSProject --template react-native-template-typescript@6.2.0version...

View Article

navigationOptions in react-navigation not work in typescript

I am changing react-native code from javascript to typescript and version upgrade.but, react-navigationHeaderOptions not working. I can't find the reason. DocumentNavigation.tsximport {DocumentsScreen}...

View Article

react-native-renimated animation reseting on value set

What am I trying to do?I am trying to animate a header from my app using react-native-reanimated.What I did until now?I've already coded the animation, however the animation reset when I try to animate...

View Article

Property 'navigation' does not exists on type 'Readonly& Readonly

I am completely new to react native.I have the following components:Playlists:export default class Playlists extends Component { playlists = [ ... ]; render() { const {navigation} =...

View Article


How to test expo permissions has been called with camera permissions

Here I have a withPermissions HOC component like belowexport function withPermissions<T>( WrappedComponent: React.ComponentType<T>, requestedPermissions: RequestedPermissions, ) { return...

View Article

"parserOptions.project" has been set for @typescript-eslint/parser

I created a new React Native project with --template typescriptI deleted the template directory which came as part of the boilerplate.I then proceeded to add ESLint:module.exports = { parser:...

View Article


How to deal with SQLite migrations in React-Native using TypeORM?

I am writing a React-Native app which heavily relies on local storage, and have chosen TypeORMto handle this.I am now entering a phase where my project is live, and I want to add new functionalities...

View Article

Typescript: onPress type

I just ported my react-native project to typescript and have a question about functions as propsim passing:<DisplayCardsWithLikes data={testData} likes={500} onPress={() =>...

View Article


How to fix TypeError: undefined is not an object (evaluating '_config.Svg.G')

I'm getting this error in an expo react native project I'm working on. I've updated all packages to match expo SDK 36, so I'm not sure where the error is coming from.TypeError: undefined is not an...

View Article

How to unlock rotation on one screen in react native

I tried using react-native-orientation in a webview to get it being the only view that would rotate.import React, {useEffect} from 'react'; import { WebView } from 'react-native-webview'; import...

View Article

react navigation: how to pass redux props with NavigationStackScreenComponent...

I started using typescript in my react native project (typescript newbie) and hit a problem with navigationOptions in functional component with typescript, i solved it thanks to this post here however...

View Article
Browsing all 6208 articles
Browse latest View live


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