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

How do i get ride of this react native animation Moti error?

I am using moti library for image animation in react native this error is thrown to me.ERROR TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[3], "moti").MotiImage')Here is...

View Article


TypeScript React Native Flatlist: How to give renderItem the correct type of...

I'm building a React Native app with TypeScript. renderItem complains that the destructured item implicitly has an any type. I googled and found this question and tried to implement what they teach...

View Article


Passing function to throw Stack.Screen in react navigation

I'm attempting to pass a useState function between screens. I receive this function on the App.tsx and I passed it to the Navigator handler, to I can pass the set parameter into the signInScreen.This...

View Article

Displaying loading indicator screen accroding to state

I'm attempting to show a simple loading screen component when the data is connecting to firebase (creating a user, or login in). I have set all the indicators with a useState, although when the loading...

View Article

Can't change ref.current.props.visible in typescript

trying to change .current but i get "cannot assign to read only property 'visible' of object '#'i think changing localVarRef.current.props.visible directly is fine because useRef is MutableRefObject.i...

View Article


What are the alternatives to RCTEventEmitter and RCTModernEventEmitter?

I am trying to integrate a Native UI component in react-native using the new architecture with fabric enabledHere is my spec fileimport type {HostComponent, ViewProps} from 'react-native';import type {...

View Article

React Native - RNPickerSelect - Empty value before the first dropdown item

When I user RNPickerSelect I get my items in the dropdown, but right before the first one there is an empty value which I want to remove. I just want the first item to be selected automatically. Does...

View Article

eslint@typescript-eslint/no-unsafe-return throws error message when using...

I have a react native typescript project where I am using inline require() statement to import images for example.<Card.Image source={smallPhoto ? { uri: smallPhoto } :...

View Article


How to specify (optional) default props with TypeScript for stateless,...

I'm trying to create a stateless React component with optional props and defaultProps in Typescript (for a React Native project). This is trivial with vanilla JS, but I'm stumped as to how to achieve...

View Article


react-native-popup-menu MenuProvider typescript IntrinsicAttributes

I want to achieve drop down options in Flatlist,I have used React native popup Menu and in App.tsx I have declared the entry point as MenuProvider.I am getting this error.Type '{ children: Element[];...

View Article

Using typescript and react native, how can i pass data between two screens?

I'm trying to passing data between screenthe data:const [arrange, setArrange] = useState(false); // the clubs arrange statethe state is updating the home screen and arranging it differently based on...

View Article

How do I reset a screens state to its initial state when using react navigation?

I want to reset the state (back to initial state) in a functional component when navigated via navigation.navigate().Say a user navigates to an A screen and some state is set, then they click a button...

View Article

Pass data between two screens with React Native and TypeScript

I'm trying to pass data between two different screensHere is the data:const [arrange, setArrange] = useState(false); // the clubs arrange stateThe state is updating the home screen and arranging it...

View Article


React on both mobile and web

I've been trying to research this but haven't found much information on it. I'm investigating writing React in Typescript in code that can be both run on mobile but also the web. I've seen some tricks...

View Article

Property 'width' does not exist on type 'StyleProp'

I am working on a React Native app built with TypeScript. I have a component which uses the same props as a View element. If there is a style prop, I need to pull the width in order to pass a...

View Article


In React, is there a way to generate dynamic enum given a number of children...

I have an high order component called Box. const Box = ({ children, ...props }: any) => { const { constraints } = props; return (<View style={ { paddingTop: constraints.top, paddingRight:...

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


React native typescript giving me an TS error when using "className"

used React for a while now but new to React Native.I am using tailwind with https://tailwindcss-react-native.vercel.app/installationimport { View, Text } from "react-native";import React from...

View Article

Image may be NSFW.
Clik here to view.

VSCode type inference broken

So in a mobx state tree view, I have this functionget hasIntro() { const { rootStore, groupInfo } = self // @ts-ignore const { userStore } = rootStore // userStore is not yet initialized in root store...

View Article

Get notified when ref.current changes in React

Is there a way to get notified when ref.current changes in React ? Like the code below.const ref = useRef(0);// pseudo coderef.addCallback((newValue)=> { // notified});ref.current = 1; // triggers...

View Article
Browsing all 6287 articles
Browse latest View live


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