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

react-native-webview Typescript error: 'WebView' cannot be used as a JSX...

I am trying to set up a simple React Native app using Expo with TypeScript that shows a WebView. My App.tsx file contains the following:import Constants from 'expo-constants';import { StyleSheet } from...

View Article


TypeScript not reconizing UI-Kitten components

Error message on IDE:TS2786: 'ApplicationProvider' cannot be used as a JSX component. Itsinstance type 'ApplicationProvider' is not a valid JSX element.Not just ApplicationProvider, but every component...

View Article


First Item in Bottom Tab Navigator Automatically Redirects to Last Item in...

This is a strange one that I'm trying to wrap my head around. I'm trying to have the middle screen be the initial screen that gets shown to the user on app load. If I navigate to the left tab...

View Article

Can someone explain to me what does 'as never' do in this piece of code?

Like the title says, I'm confused as to what 'as never' means in this piece of code. I read that it's supposed to mean something that never occurs or excludes other types but I'm not quite grasping why...

View Article

TS2786 TypeScript not reconizing UI-Kitten components

Error message on IDE:TS2786: 'ApplicationProvider' cannot be used as a JSX component.Its instance type 'ApplicationProvider' is not a valid JSX element. The types returned by 'render()' are...

View Article


Image may be NSFW.
Clik here to view.

Font.loadAsync unsafe assignment of an any value on imported fonts

I'm trying to import some fonts with using the Font.loadAsync but I'm getting this error:Unsafe assignment of an 'any' valueDependencies on my package.json"dependencies": {"@react-navigation/native":...

View Article

Image may be NSFW.
Clik here to view.

How to implement Installable features inside the react-native App?

[ I want the app to fetch and download the bundle kept on a remote server ]Explanation:I want to create an app which will have minimum feature for users. If user wants to add more features later, then...

View Article

How to download images to local gallery or files in React native

const downloadFile = () => { let date = new Date(); let FILE_URL = fileUrl; let file_ext = getFileExtention(FILE_URL); const {config, fs} = RNFetchBlob; let RootDir = fs.dirs.DownloadDir; let...

View Article


How do I configure absolute paths for imports in TypeScript based React...

In order to avoid '../../../../' style relative imports in a TypeScript based React Native app, I would like to configure the app so that I can use absolute imports instead.It is important that the...

View Article


Image may be NSFW.
Clik here to view.

Type 'string' is not assignable to type 'SOME TYPE', small confusion when...

Below is how I am using my reusable component Badge made by me. It has types of props as follows but this gives some kind of error as:Here is full code,const variantsMap = { done: "success",...

View Article

React-native & typescript: component, property 'children' does not exist on...

I am struggling to understand why typescript giving me this error message when I use <ImageBackground> and <Image> component from 'react-native'.error message:No overload matches this...

View Article

React Navigation V5 custom header + Typescript Error: custom property...

I create custom header:const header = ({ navigation, route, options, back }: NativeStackHeaderProps): React.ReactNode => { const buttons: HeaderRightButtons = route.params?.rightButtons || [] return...

View Article

Decoration support for Expo Web using node library in Yarn Workspaces

I have set up a yarn workspace with an expo app and a nodejs lib. This nodejs lib uses class-validator that uses js decorators to work.I can import normal typescript objects from my lib but cannot...

View Article


Image may be NSFW.
Clik here to view.

How to keep marker at the bottom of the screen when zooming like google maps?

I was wondering if it is possible to change the default behavior zoom, the default seems to change the viewport in all directions, but I want to keep the bottom where it is, and only resize the other...

View Article

FlatList moves/drags in all directions

When I click on my FlatList I can drag and move it in all directions (up/down/right left). Although the list appears to be vertical (maybe because of the styling), the scroll bar still appears...

View Article


React Native Navigation Argument of type 'string' is not assignable to...

I have this problem with react native, react navigation, even with this error the navigation flow is still working.Argument of type 'string' is not assignable to parameter of type '{ key: string;...

View Article

Metro Builder: SyntaxError: Unexpected token = after upgrading to React...

Today I updated to React Native Version 0.65.1.After that I was unable to Start the Metro ServerI am now receiving following error message while building a Release .apk:...

View Article


React Native TypeScript Error: Module '"react-native"' has no exported member...

I've recently implemented dark mode into my app, but having an issue with an error when building the npm package with npm build. The code works, but is there a way or a reason to remove this...

View Article

Close button round icon for Android and iOS using React Native

I am trying to create a close button with clickable action. here, I need to design round close button icon and place it top of right corner in the view. How to achieve this using react-native?enter...

View Article

Argument of type { someParam: boolean } is not assignable to parameter of...

I m gotting the error mentioned on the title while I m trying to add some params to the navigator screen using the current generated typenote that it's working on other screens and also on this I can...

View Article
Browsing all 6287 articles
Browse latest View live


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