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

The animation does not trigger when react native clicks for the first time

Why does the animation effect I set always have no effect when I click it for the first time? and What is the typescript of ref binding animation in react native?const Test = () => { const messRef:...

View Article


Trying to animate opacity, Reanimated2

I work on a slider. I passing a currentIndex property to my component and I want it to be used to animate.See:interface DotProps { index: number; currentIndex: Animated.Node<number>;}export const...

View Article


FlatList Next and previous page React Native

so i want to make Next and previous page but in a table, in the table you can only show 3 type of header and when you go to the next index you change the header text, and when you change the next page...

View Article

Mocking react-native-keychain, undefined is not a function

I'm trying to write a test for my helper Functions which uses the react-native-keychain library.I accordingly to the documentation mocked the library.I added a directory react-native-keychain to the...

View Article

Image may be NSFW.
Clik here to view.

How to stop vscode to edit a file on save?

I have a very silly issue , i have this line of code : const [fontsLoaded] = useFonts({ Manrope: require("./assets/fonts/Manrope-Regular.ttf"), });so as the gif shows ( very low quality sorry ) on...

View Article


Why are components not rerendering on state change even WITH key change?

I have a custom tab component that I'm using to navigate between tabs with my desired format. One of the tabs has buttons that also need to navigate to these other tabs (not my design, I can't change...

View Article

React Native - unit test fails because of Native Module

I am getting a weird anomaly when I declare a Native Java Module the new code doesn't pass unit test. Basically whatever I import from NativeModules in React Native lacks a definition: So the Unit test...

View Article

Image may be NSFW.
Clik here to view.

Error appears when using Typescript with Alert component in React Native project

I am getting an type error using typescript in my React Project. I am using the alert component and rendering my buttons conditionally.const buttons = () => { if (item.type === 'volume') { //...

View Article


Image may be NSFW.
Clik here to view.

React native KeyboardAvoidingView making Text disappear

I'm trying to implement KeyboardAvoidingView, although whenever I insert it, a single Text disappears from my screen. This text is in the middle of two other components.How I tried to implement:import...

View Article


Is there a better way to find an specific object inside an array by name?

I know this could be easily done with a loop like I'm doing in the method below. I'm just wondering if there is any pre-build function that I can use to get the same result my code gets here:const...

View Article

Why typescript occurs compile error with using the surrounded constant...

I'm always curious about when the union-type condition handling in Typescript with React-native is used, If I used const with surrounding conditions, Typescript does not detect the inner condition of...

View Article

How to use useMemo in this example?

I'm struggling with problem chaning const variable to const with useMemo. I tried some example from docs and some tutorials and nothing worked for me. This have to be easy...const bottomSheetOptions:...

View Article

How to use Grid in Tailwind?

I wanted to try out grids in our React Native app to see how it would look, however I don't seem to be able to get it working. I´ve tried to read up on it, but I'm pretty new so I'm not certain if the...

View Article


React Native - integration not send data

I'm trying to login via mobile, but the data is not sent.On the web it works normally.In Postman it works normally.The React Native returns the error message: "response": "{"message":"email must be an...

View Article

Why is Redux causing all of my React Native tags to have a ts(2786) error?

In my App.tsx file, as soon as I enter this line of code:import { Provider } from "react-redux";all of my React Native tags throughout my entire project get a red line under them with an error message...

View Article


How to gotTo specific page using ngx-bootstrap pagination

I have a query where I need to implement: How to gotTo a specific page usingngx- bootstrap pagination by entering the page number to some input field.Here is the following code snippet...

View Article

What does this notation mean in React-Native?

I took over an unfinished react-native project and this notation confused me. An anonymous function is written in curly brackets and given various arguments ( handleChange, handleBlur, handleSubmit,...

View Article


Error with types when using AnimatedSlider and useAnimatedProps

So I have an AnimatedSlider, which changes color by getting a useSharedValue. And I use a useAnimatedProps to update the colors.const AnimatedSlider = Animated.createAnimatedComponent(Slider);... const...

View Article

How can I put an object inside an array with different properties

So I'm trying to make an array with different properties for each day of the week.I have this array:const [fullData, setFullData] = useState([{index:-1,exercise:""}])So when user clicks on Monday for...

View Article

Image may be NSFW.
Clik here to view.

'Stack.Navigator' cannot be used as a JSX component

There is a type issue using react navigation, when use Stack.Navigation or Stack.Group from createNativeStackNavigatorThe issue saids that the types dont match with JSX.element at the end of 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>