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

React hooks can't work inside storybook for react native

TechnologiesReact(17.0.2)React Native(0.66.4)TypeScript(4.4.4)Storybook@storybook/react-native(5.3.25)@storybook/react-native-server(5.3.23)What I'm facingI'm facing the following react hook error in...

View Article


How to use hooks as value of context provider in react js typescript

I had created a hook that fetches API and I need to call that hook in multiple components but while mounting that component every time the API is re-fetching so I had decided to call that hook as value...

View Article


What does fit to coordinate do in react-native-maps

Can someone tell me what does fitToCoordinates do in React native (react-native-maps)?react-native-maps have mentioned this in their docs| `fitToCoordinates` | `coordinates: Array<LatLng>,...

View Article

Error: node-pre-gyp install --fallback-to-build --library=static_library

I keep getting this error whenever I run yarn install on my React Native app. I'm trying to update React Native to version 44 from 39, but I keep getting this error when I try to install anything at...

View Article

React Native TextInput wrapper component, how to clear the value from "outside"

I needed to define a component which wraps TextInput because I have a lot of text inputs in my App and I want them to have a trash-can icon to clear text and a common style.My component is this:import...

View Article


How to use class service in React Native

I come from the Angular world where I can have a service with methods and properties. Then I can import this class in another file, inject it in the constructor and call the class's members. Now I am...

View Article

React Native Unit Test not able to interact with component

I'm trying to figure out how to setup user interaction with a react native component, but nothing seems to be working. Here's the code:PriceDetails.tsxThis is the return statement from the component...

View Article

Why am I getting error ts(1005) ',' expected

I'm following a tutorial to learn how to create APIs with React Native and I'm getting ts(1005) error. Can someone please help me? I've tried other solutions, but still, no success, and the comment...

View Article


FlatList Typescript error missing return type on function

Im trying to use a interface on the renderItem={({ item }) from flatlist, but whenever i try im getting the same error."Missing return type on function....

View Article


com.facebook.react.common.javascriptexception : unexpected token ‘export’

i am using React Native 0.59.3 after i install package react-native-background-timer it given me error like that.com.facebook.react.common.JavascriptException : Unexpected token ‘export’Andunexpected...

View Article

React Navigation w/ TypeScript: How to properly type out screen params?...

I'm not wrapping my head around how the types work for screen params. I looked at the documentation (https://reactnavigation.org/docs/typescript/) but I have no idea where they got the user.id...

View Article

Use yield inside of setTimeOut in redux saga

In my React project I have the following code:export function* onDisplayAlert({ payload }: any) { payload.id = getUniqueID(); yield put(setAlert(payload)); yield setTimeout(() => { yield...

View Article

If it possible in typescript to clone error with some modifications?

I stucked with an issue - I'm trying to use Sentry.captureException with received error, but before that i'm trying to change error message. Spent a lot of time to find an answer to my question, but i...

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

firebase_compat_app default.auth is not a function

I'm using firebase realtime database and trying to use the Auth method firebase_compat_app__WEBPACK_IMPORTED_MODULE_0__.default.auth is not a functionI tried some resolutions and suggestions that I saw...

View Article


Custom React Native Asyncstorage hook causes weird results?

I have a project in React Native that utilizes React Navigation as well as Asyncstorage in order to store data to be edited by child screens. Since we need to listen for changes to each key globally, I...

View Article

cannot initiate expo bare workflow with typescript

I`m trying to initiate expo bare workflow with typescirpt.But after I type "expo init [project name]" in command window,I cannot find minimal(typescirpt) option.? Choose a template: » - Use arrow-keys....

View Article


Image may be NSFW.
Clik here to view.

RN - navigation with typescript passing params

I'm trying to create a minimal working example for an app with common navigation usege with typescript. Just to use it as reference for future projects. To be honest I'm struggling a bit to understand...

View Article

Not able to use actions in React Native

I am trying to implement Redux state management in my react native app but I am facing an issue . I did the same thing in my react app and it worked fine . I am using typescript template .export * as...

View Article

Add data to chart properly

Hey folks I have a task to show user data on the chart (I'm using react-native slide charts) but it becomes a little bit tricky.So what I'm trying to achieve is next:I'm making a request and get the...

View Article
Browsing all 6287 articles
Browse latest View live


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