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

Image may be NSFW.
Clik here to view.

How does this switch statement work? The case values appear to be undefined...

I'm trying to understand how this code works, because it seems like it should not, but it does work.Is this some TypeScript magic I'm not understanding? React magic? How does this work if the cases are...

View Article


What is _data in object received from firestore?

I'm using firestore in my react native app.In some case I calling firestore to get all docs from specific collection and for some reason the array of data received in wrong format.{"_data":...

View Article


Passing ref to a textInput wrapped in a component

I have 6 TextInputs and I am trying to switch through all of them (switching focus) when pressing the submit button on the keyboard. I have a functional component that uses a TextInput from...

View Article

How should beginner start with react native bridging? [closed]

https://stackoverflow.comAny online courses available please share </https://stackoverflow.com>

View Article

How to extend React Native View and other components props with...

I'm using styled-components for styling in React Native with Typescript. I created a StyledComponent that styles a View component. However, when I try to extend the ViewProps, it throws me an...

View Article


Delete a field from Firebase Firestore where the field/key has a...

This question is for a React Native Expo mobile App if that matters.I have a flat database object. Using the documentation as an...

View Article

React Native SectionList: What are the correct TypeScript types

I'm building a React Native app using TypeScript. I'm trying to use a SectionList. I followed the docs, and here is my code: renderSectionHeader = ({ section: { title } }: { section: { title: string }...

View Article

How use UseRef to show popover just above the pressed element in React Native?

I am using the Flyerchat library for the chat application.<Popover isVisible={open} onRequestClose={() => setOpen(false)} from={touchable} ref={touchable} arrowSize={{ height: 0, width: 0...

View Article


every first react-native component gets typescript error like this:

when I use this Text component of react-native, I get this error:No overload matches this call.Overload 1 of 2, '(props: TextProps | Readonly): Text', gave the following error.Type '{ children: string;...

View Article


every first react-native component gets typescript error

When I use the Text component of react-native, I get this error:No overload matches this call. Overload 1 of 2, '(props: TextProps | Readonly<TextProps>): Text', gave the following error. Type '{...

View Article

Is there a way to handle number inputs instead of string with React Native?

I have a react context state for my multi form input values: const [formValues, setFormValues] = useState({ sex: "male", unitSystem: "metric", heightInCm: "173", weightInKg: "60", dateOfBirth: null,...

View Article

search after click in the submit button with useInfiniteQuery

I'm trying react query and found useInfiniteQuery. then I start creating my infinite list of posts, but now I'd like to put an input to search for a specific post.I have two endpoints: one for fetch...

View Article

how to properly make a reusable component?

I make reusable component like this:export type ElementKeysType = | keyof ViewStyle | keyof TextStyle | keyof ImageStyle;export const handleElementProps = <T>(obj: T, keys: ElementKeysType[])...

View Article


Embed script tag in react-native mobile app

I'm trying to embed a script tag in my react-native mobile app. So far, I've been trying to create a component class and export that, but I was wondering if there's a way to export the script tag as a...

View Article

Image may be NSFW.
Clik here to view.

.tsx files throw errors while .js files work fine

in react-native, when I try to pass parameters to functions/components/etc, typescript files will always complain and it won't work until I have specified the type which often is confusing and the code...

View Article


How does one trigger an action in a child functional component in React?

With a basic form/input layout, it's clear that a callback should be used for state changes from child to parent (initiated by child), but how can the parent ask the child component to re-assess its...

View Article

React Navigation Custom Tab Typescript Params

I am developing projects with Typescript language with React Native library. While creating a Custom Tab Bar, parameters include state, descriptors, and navigation. What should I specify as a type with...

View Article


Getting "Types of property 'accessibilityRole' are incompatible" error

Am getting typescript error when i extend th TextProps from react-native and pass it to the Text component created by styled-component Overload 1 of 2, '(props: Omit<Omit<ActivityIndicatorProps...

View Article

TypeScript type for onLayout event in React Native?

How can I specify a type in TypeScript for React Native's onLayout event? const handleOnLayout = (e: SomeTypeHere) => { // stuff };<View...

View Article

react-i18next on React Native No overload matches this call typescript

Iam trying to configure react-i18next 11.8.2 in my React Native app with typescript 4.1.2:i18n.use(initReactI18next).init({ resources: { en, es, }, lng: 'es', fallbackLng: 'es', interpolation: {...

View Article
Browsing all 6287 articles
Browse latest View live


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