How to change main image slider using thumbnail image on click in react native?
I had Created an E-commerce app like Flipkart moreover I have to create the product image. Whenever I click on the bottom thumbnail image the main image needs to be changed dynamically. I have attached...
View ArticleGetting "Invalid call" when using require with Typescript and Expo
I am trying to play some audio in a react-native app created with the expo-cli.The code is written in typescript and the offending code looks like this, taken from the expo.io documentation:import * as...
View Articlereact native unfocus TextInput
I want to make a search bar in react-native like that :If I click on icon, I focus on textInput, but if I click on other part of screen, unfocus the textInput.The focus part is working with the ref,...
View ArticleHow to show multiple components in a specific position inside of a parent...
I am trying to render multiple components inside of a parent component on a specific position (based on some calculations). The calculations that give me the vertical position look correct, but the...
View Articletypescript expo '_this.flatListRef = _ref4' undefined is not an object
Trying to set up scrollToIndex on a flatlist with typescript on expo but getting an error I don't really understand.I was following the example snack...
View ArticleChange language based on user selection on expo
Just wondering if there's any way to change the language of an expo app with typescript based on user selection (so not device language).I read through the docs on expo...
View ArticleChanging i18n.local and storing in asyncStorage does not change language of...
I'm trying to make a dual language app that allows users to select the language they're after, but when selecting, it doesn't change despite i18n.currentLocale() showing the correct selected...
View ArticleReact Native with TypeScript Error unable to resolve module
I just created a new project with React Native Typescript template. But I found that when I import a new component it throws the following error. My new component is located inside...
View ArticleHow to correctly send an image to the backend (nodejs) using multer in React...
I'm having trouble sending a photo, in a PUT route, be it with Axios or Fetch, anyway, my Nodejs backend is configured and the whole upload process works normal testing by Insonmia, but in React Native...
View ArticleItem of key extractor has type unknown - React Native
How can I define a type for the renderItem handler of a FlatList in React Native?That's how I'm currently handling it:// Importing the generic type of the FlatList render item handlerimport {...
View ArticleReact Native Typescript Formik cast event type
In the Formik documentation for React Native it has an example form:<Formik initialValues={{ email: '' }} onSubmit={(values) => console.log(values)}> {({ handleChange, handleBlur,...
View ArticleHow to import a markdown file in a typescript react-native project?
I have tried to import a markdown file into my typescript react-native project in 2 ways.import * as readme from "./sample.md"import readme from "./sample.md"Both didn't work. So I found a similar...
View Articlesound.stop() does not work , but sound.play() is working in Howlerjs?
I am trying to use Howler.js in Reactjs using typescript.I can able to play the sound but it does not pause or stop. Here is my code.This a component where I am passing all the audio details using...
View ArticleHow can I type check ReactNavigation's navigation using NavigationHelpersCommon?
I am new to the typescript screen, so the answer may be an obvious one. I am passing ReactNavigation's navigator as a prop to a functional component and I currently type check using navigator: object,...
View ArticleNativebase React Native why can't i pass a number on an input
I'm using react native nativebase and i want to pass a number to my input value but im getting an error that says i cannot pass a number to a string.<Input keyboardType="numeric"...
View ArticleReact Native is Not fetching the latest data from API call
I sicerely Apologies if this has been asked before. I am a bit new to react native and react in general.my react nativee code is not fetcing the latest datasee the code for the list component belowI...
View ArticleType 'Element | undefined' is not assignable to type 'ReactElement
I have a component that looks like this. This version works perfectly:export default function StatusMessage(isAdded: boolean, errorMessage: string) { if (isAdded) { return <ResultAlert...
View Articlereact native upload image with axios
I have this datacame from react-native-image-pickerdata: "/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2Qtan" => 90kbfileName: "77677.jpg"fileSize: 67542height: 600isVertical: trueoriginalRotation:...
View Articleimports/exports using the ~ sign
I have a components folder where I am defining components like this:export const ResultAlert: FunctionComponent<ResultAlertProps> = ({ severity, text,}) => { const classes = useStyles();...
View ArticleReact navigation 5 error Binding element 'navigation' implicitly has an 'any'...
I am new to react-native. I am trying to implement navigation using react-navigation 5. I have two screens Home and profile. These both components have received a navigation prop but typescript is...
View Article