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

How to get specific stack route params type with React Navigation V5?

I use React Navigation V5. I want to get the params type of specific route. For example, if my StackParamList is:type StackParamList = { FirstRoute: { someNumber: number; someString: number;// etc...

View Article


What is the default value for tsconfig "include"?

In my react native project I'm using this library v1 and in the docs it says to add "include": ["node_modules/react-native-redash/lib/typescript/v1/index.d.ts"] to make the types work, and adding that...

View Article


Image may be NSFW.
Clik here to view.

React native child not receiving updated props value

I am new to react and making a little app to learn the library and way of thinking.But I ran into a problem which has me completely stomped...I have the root components that contains a list of tasks.I...

View Article

"VirtualizedList: You have a large list that is slow to update" warning even...

I've been having lots of trouble trying to avoid getting the "VirtualizedList: You have a large list that is slow to update" warning when using a <FlatList> component with React-Native.I've...

View Article

React-native-image-picker camera doesn't open

I need to add image picker in my app. I've created small class for image picker logic:import {launchImageLibrary, launchCamera} from 'react-native-image-picker';export default class ImagePickerService...

View Article


Is it a good practice to use switch case in useEffect Reactjs?

I am handling some functionality in some functions. Basically I am handling some states in multiple functions. Those functions need to be called when particular state updates. Now there are a lot of...

View Article

How to expand search bar after pressing search icon in the header(appbar) |...

As I'm new to react native i dont know how to implement the searchbar in header. Please take a look at the image provided below.the search icon in the appbar when clicked should expand on...

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


React compiled with problems antd

There is always show errors when compiling but I have import from antd I don't know what is the problem.These are the error show when compilingCompiled with problems:ERROR in...

View Article


react-native web application is not run the web browser

i wrote code in react-native and saved as typescript files then try to run then app in web browser but it's throwing error of (Module parse failed: Unexpected token (a:a)You may need an appropriate...

View Article

Scandit using typescript

I wanted to convert this repo(in this particular file) to use typescript. My problem is that I'm not too familiar with using classes. So far I have done this, however, I'm still getting errors.The...

View Article

How to hide bottomTabBar navigator when at top of scrollView react native

I have a nested stackNavigator inside a tabNavigator I am trying to make so that when I am at the top of the scrollView the tabNavigator is hidden.function Users() {const navigation =...

View Article

react checkbox onChange to call function is check state is true in typescript

I am exploring the react onChange feature. The functionality I would like to do iswhen checkbox is selected, I would like to update local data to add some valuewhen checkbox is unselected, I would like...

View Article


Masking the given number while on typing in the input field before clicking...

I am developing the SSN number in react native. Now in my code, I am masking the number like 123 - 45 - xxxx OR xxx - 45 - 6789 only after clicking the save button. But now I wanted to mask that number...

View Article

Eslint CLI doesnt show prettier errors but VSCode does

I wanted to use eslint to integrate the airbnb styleguide. Also I want the prettier style rules.Problem is eslint is giving me no errors when using it from the command line but VSCode does.VSCode shows...

View Article


React Native with TS relative path not working

I am trying to use relative path using babel-plugin-module-resolver, but no matter what I make, it doesn't work. I've read the React Native docs about it, and the babel lib docs too, but the metro...

View Article

Type of React.cloneElement, React.Children.map

const element = React.Children.map(children, (child) => { --> if (child.type !== CardFooter) return React.cloneElement(child); });child & child.type prompts TS error."Property 'type' does not...

View Article


getByTestID not working for custom component

Working on writing a unit test for a large component. I've written one before for a smaller component, but this has several other custom components nested inside. I'm trying to select it so I can then...

View Article

Image may be NSFW.
Clik here to view.

I am getting this 'withNavigation can only be used on view hierarchy of a...

Navigation works fine on other pages but doesn't work on this page particularly.I have tried various solutions but nothing worked.picture:github :...

View Article

How to Union Type react navigation prop?

Union Type react navigation prop?Hello everyone,I am using typescript with react-navigation module on react native and I am trying to type a child component Navigation prop that can be used by two...

View Article
Browsing all 6287 articles
Browse latest View live


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