React | ForwardedRef using React.Component
I'm creating a custom component in React, and I need to export it using forwardedRef. But when I try, this error occurs:errormy code:export interface ButtonProps extends...
View ArticleBetter way of defining types for 'navigation' object, when using Stack...
I'm having some trouble with modularization for the prop types, when using react-navigation.My problem is:The React Navigation doc Typescript section suggests creating the types for each screen props...
View ArticleReact-native-reanimated not working in web
Currently i`m copied example from this posthttps://github.com/software-mansion/react-native-reanimated/issues/537When trying in web Reanimated not working and RN Animated working well.There is no...
View ArticleTrying to create custom icon set in react-native(expo) but getting a...
I am trying to create my own Icon set in react native, but struggling with the types.Here is my code for Percolate.tsx file.import React, {FC} from 'react';import { createIconSet } from...
View ArticleI'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 ArticleFlatlist button getting wrong item data
I am having an issue with the following screen that includes a flatlist. I get data in offerState using its context. From there I display the data using a flatlist and stylizing it using the component...
View ArticleReact Native: 'Component' cannot be used as a JSX component. Type '{}' is not...
I just started a new project but i'm getting the following error with various packages, for example React Native Reanimated and React Navigation Stack.This is my package.json.{"name":...
View Articlehow to create a wrapper that changes the props for the component in react
I m trying to do something with react components for the first time and need your help,I want to wrap a component inside another one dynamically and changing its props.for example, let's say I have...
View Articlereact native - add diffrent icons to items and also make them pressable
I work with the 'react-native-super-grid' library and I trying to figure out how to do the following 2 situations:Displays a different icon for each item in the gridfor example : the PinIcon will be...
View Articlereact native: how can I make the user edit a video/photo and save it in his...
I want to make it so that once the user saves a video or chooses a video from their gallery can edit it and save it to their gallery. Like in Snapchat...How can I do this? Thank you!
View ArticleFieldRenderProps with React Native TextInput
I created custom TextInput for final-form in React-Native. And I need to specify type for FieldRenderProps. And I have an error:TS2769: No overload matches this call. Â Â Overload 1 of 2, '(props:...
View ArticleExecution flow in react native after navigation.navigate
Need suggestion and advice,I am using the below 2 lines of code in react native expo component,this.props.navigation.navigate("App"); patchUser(this.state.dataSource.userInfo.username,...
View ArticleCalculate distance from user current location to a specific location...
IN REACT NATIVE:Show a map that fit these markers on it:User current locationSpecific Location (24.41913107517948, 54.43699913714186)Show green circle with radius 3km, around the specific location...
View ArticleAccess component ref from outside its scope
I would like to have a custom hook that would provide me with a ScrollView component and a function to imperatively control the scrolling of that given component.I'm using a library called...
View ArticleCalculate distance between current user location to another location [closed]
IN REACT NATIVEIf user current location is inside the radius, show success message, if the user outside the radius show an error message WITH THE REQUIRED DISTANCE TO THE GREEN RADIUS.
View ArticleHow to get style props suggestions with react native typescript re-usable...
I have a text re-usable component coded like this :import React, {FC, ReactNode} from 'react';import {StyleSheet, Text as RNText} from 'react-native';interface TextProps { style?: any; children:...
View ArticleReact XAxis tick label formatted with line break
I need create a chart like this on fiddle: const {LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ScatterChart, Scatter} = Recharts;const data = [ {name: 0, uv: 4000, amt: 2400}, {name:...
View ArticleCalculate distance between user location and fixed location
I am trying to calculate the distance between user's current location and specific location. In other words, I need the distance required for the user from their current location to the specific...
View Articlehow to use on() firebase database method to return value to the calling...
I am writing a firebase database helper file having functions which must return data from database to the calling function. The functions should also return the updated data if there are any changes...
View Articlehow do I add a custom function to work with Yup?
sup?I'm trying to create a form validation using formik and yup. One of the fields needs attention when validating, so I use a lib that has an value.isValid(valueThatNeedsAttention) function. how could...
View Article