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

TS: custom onSubmit do not match React Hook Form types

I'm geting type's problems when I try to use SubmitHandler type to typping onSubmit prop, I'm getting:TS2345: Argument of type 'SubmitHandler<T>' is not assignable to parameter of type...

View Article


Is there a better way to add optional values to an object?

Currently I'm doing the optional addition using something like this ...(!!providerId && { providerId }), ...(!!practiceId && { practiceId }),Is there some shorthand logic to replace...

View Article


React Native - UseEffect Constantly Updates

I am using useEffect to get the total jigsaw pieces from my async storage to be displayed on the home page. I use async storage to get the number of jigsaws stored in the storage then for each jigsaw,...

View Article

React Native - Information Box

I am trying to create an information box where someone clicks on the help button it displays information over the current screen.Ideally, i would like something like this Information card where the...

View Article

Music player in react native

Which is a best way to fetch the all my audio files which store in my local device storage and use in a my react native offline music player app . Or suggest me library which help me to archive this task

View Article


Generate random modal with one button click - React Native

I'm developing a project for myself, in React Native. I have a button that can open up two modals at the same time. However I need it to randomize between the two, so there's a 50/50 percent chance...

View Article

Image may be NSFW.
Clik here to view.

Fresh installation by npx react-native init myapp causes in problem warning

I do the terminalcommand npx react-native init myapp. Change the dir to /myapp and vs code shows me this problem warning:There are some more Errors like this in the file, without doing anything.What...

View Article

How can I disable React-Select dropdown values from showing when clicking icons?

Using react-select we have some options that have a callback and when clicked open a separate modal. We've created a custom MultiValueLabel which has a callback to the oneditMultiValueLabel: props...

View Article


My useFetch hook is giving me too many re-renders

I'm trying to abstract my fetch out to a hook in my expo react native app. The fetch must be able to do POST method. I started out by trying to use and then modify the useHook() effect found at...

View Article


How to set state of the response to an api call for a complex object to react...

I'm working on a react native typescript project.How do I set my context object to the data I receive as a response from an api call?I don't want to have to make the API call every time I load the...

View Article

React Native: Using `useRef()` on extended component

I want to use useRef() on my extended component.const ref = useRef<TextInputProps>(null);This is the TextInputProps:export type TextInputProps = ThemeProps & DefaultTextInput['props'] &...

View Article

Add strong typing for react navigation props

I'm using typescript in my react-native project(expo).The project uses react-navigation, so on my screens I can set navigationOptions and I have access to the prop navigation.Now I'm trying to strongly...

View Article

how to use useState instead of .push Array?

Hello I am trying to push a mock data to a store data. I understand from the .push function it doesn't work globally where as using a useState it can update state of the array. I couldn't figure out...

View Article


Erro Network request failed e JSON Parse error: Unrecognized token '

Estou fazendo um projeto para a faculdade (aplicativo mobile com reactnative, node, typescript e expo) e ao tentar utilizar a SDK do stripe,está ocorrendo os seguintes erros: Erro Network request...

View Article

Image may be NSFW.
Clik here to view.

Typescript React Native AnimatedEvent: 'Type 'number' is not assignable to...

Getting this typescript issue 'Type 'number' is not assignable to type 'Mapping'.ts(2322)'This occurs when trying to add an Animated event on scroll...typescript knowledge is a bit sparse wondering if...

View Article


How to get the data to update using UseState?

I having been trying to update the data using UseState with Typescript. The data is never updated what so ever. I am not sure what is it that I am missing. I just want to make sure that the information...

View Article

React navigation/native property doesn't exist on type props

I'm having troubles adding a prop to my page using React Navigation in my TypeScript React Native app. I have tried to follow the instructions in https://reactnavigation.org/docs/typescript, notably...

View Article


Unhandled JS Exception: Requiring unknown module "9"

So I'm trying to set up the navigation for a log in screen and I've tried relinking dependecies and installing packages all over again and I've only worked on two files. I am working on MacOS and...

View Article

Remove Warning : [react-native-gesture-handler] Seems like you're using an...

I'm creating a project to learn React Native. I'm using typescript on this project. I added react-navigation : To make react-navigation working, I had to do :yarn add @react-navigation/nativeyarn add...

View Article

Failed Testing Switch React Native with Testing Library

I'm getting the following error when trying to simulate an event using fireEvent "onChange" : "TypeError: Cannot read property 'value' of undefined"My component :const [isActive, setIsActive] =...

View Article
Browsing all 6287 articles
Browse latest View live


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