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

React Native, pushing items to an array state not working

I need to push items to my array, but when I console.log this array, it says 'undefined' for the specific value. I'm trying btw to fetch data from firebase storage. How do I correctly add items to an...

View Article


Typescript/yarn workspaces - Referenced project may not disable emit

I'm trying to setup a monorepo project using typescript and yarn workspaces.The project's structure looks like this:/example/packages /lib1Example is an app that used the packages, for development...

View Article


Image may be NSFW.
Clik here to view.

Localhost:8080 showing blank page with react-native-web

i followed a tutorial for adding web support to a react native app. using react-native-web and webpack. looks like it works for everyone. but for me, i get a blank web page. even though it works just...

View Article

how to get the type of navigation state in reacat native

I want to keep an old navigation type from previews versions under 5 , now upagrading to 6 and I see that a lot things are changedafter a some research I found that exampletype NavigationOptions = {...

View Article

Cannot find module '@env' or its corresponding type declarations

Why I get this ts-error message and how can I fix it ?Cannot find module '@env' or its corresponding type declarationsthis comes when I use this:import { FB_ID } from '@env';it should be named not...

View Article


React navigation v6- Stack wrapper vs bottomtab wrapper with typescript

okay so I'm new to react-native and very very new to react-navigation.Looking at a bunch of examples looks like most people set the 'BottomTab' stack and put it inside the 'Stack.Navigator' as one of...

View Article

React Native SQLLite execute function before going on

I need the lasted Insert ID for the upcomming foreign Key beacuse i'm importing lists.It always executes the for loop first so i made an Manually Insertion for the last id and it should go on when the...

View Article

where to structur my model file in react native?

When I use a model.ts file and add my types, should I have one global modal file or in each folder one when it needed ?idk

View Article


How can I call a function only once in typescript

I have been trying to start using typescript for react native but it has not been easy ride so far, finding it difficult to perform common function like fetch an api once on screen load, below is the...

View Article


React Native Typescript, pass variable to another screen

I cant seem to figure how to pass variable with typescript in react native, I have tried the params but its saying undefined is not an object (evaluating 'navigation.props.value').below are the...

View Article

How to pass a variable to React Native Stylesheet? [duplicate]

I want to pass a variable to the "shadowColor" property in my stylesheet from an array in the code above but I am getting a "Can't find name " error. I tried to use a template literal but it's not...

View Article

Cannot find module '@babel/runtime/helpers/interopRequireDefault' from...

I'm trying to build a mobile application with typescript, react-native, expo and jest. When I'm trying to run tests: FAIL src/components/Button/tests/Button.test.tsx● Test suite failed to run Cannot...

View Article

How to display overlay loading icon and while fetching an API in React native...

Am trying to display a loading icon or text while I fetch an API and then remove it after fetching, am using typescript for react native,below is what I have so faruseEffect(() => { const newsUrl =...

View Article


Image may be NSFW.
Clik here to view.

React-native ScrollView/FlatList stick to top and bottom of list

I would like to have an item in a ScrollView or FlatList stick to the top AND bottom of the list. This is for a leaderboard component where the current players score is visible at all times.I've tried...

View Article

rtk query ts error jwt does not exists on type

Why I get this error ?Property 'jwt' does not exist on type '{ data: IAuthResponse; } | { error: FetchBaseQueryError | SerializedError; }'. Property 'jwt' does not exist on type '{ data: IAuthResponse;...

View Article


React Native - base64 image

I'm trying to display an image that's been recorded to base64. I can console log and confirm the image is working. But I am not quite sure how to display it from the API request.I'm completely new to...

View Article

Image may be NSFW.
Clik here to view.

How to disambiguate the namespaces of react-native and node?

I am using the setTimeout function which is defined in @types/node and @types/react-native (both picked up by Typescript without any imports at the top of the file).Typescript is defaulting to node,...

View Article


How can I make a button in react.js for converting my text in the text box in...

Currently, I am working on a font modifier project and this project modifies the text entered in the text box on the website. I want to change the text color and style just by clicking a button on the...

View Article

I'm unable to load @apollo/client on a React Native Expo app

I'm trying to load @apollo/client on a React Native Expo app.And I get this error:While trying to resolve module @apollo/client from file...

View Article

Type 'Handles' is missing the following properties from type 'TextInput'

I use React Native Paper and react-native-text-input-mask to show a field for the phone number:// Importsimport {TextInput} from 'react-native-paper'import TextInputMask from...

View Article
Browsing all 6287 articles
Browse latest View live


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