How to prevent FlatList from scrolling to top on content updates
With react native, I have a FlatList that is used to render user information. A user's profile picture may not be immediately loaded, so they can be asynchronously loaded in the background.Example...
View ArticleHow to unlock rotation on one screen in react native
I tried using react-native-orientation in a webview to get it being the only view that would rotate.import React, {useEffect} from 'react';import { WebView } from 'react-native-webview';import...
View ArticleLocating memory leak React Native
I am currently trying to debug and find the culprit of a memory leak in my application (only on Android, works fine on iOS). See graph below for memory increasing. In the application I am running this...
View ArticleReactViewGroup duplicates render FlatList unclickable
I have a search window and the input is used for a simple API call. The results of that are rendered in a Flatlist (picture 1). That works fine so far. But when I update my search query the results in...
View Articlehow to format birthday?
I'm having trouble formatting the birthday date in the format 2021-04-13T00:00:00.000Z the date is sent correctly, but after this formatting it always has 1 day less. Can anyone help?export function...
View ArticleThe image source (either a remote URL or a local file resource)
hello I am new to react native I am facing an issue while I am passing imageURL as a prop I have an onboarding component in which I have an image tag I want to pass the image here as a prop but I am...
View ArticleHow can I reset a FlatList when new input is generated?
EDIT: Changed the title to something more understandable. Also: I'm already using the extraData property, but somehow things don't reset properly.I have a search window and the input is used for a...
View ArticleReact Native bug - No identifiers allowed directly after numeric literal
I am trying to use a data file which I am mapping over in a React Native component but I am getting the following error:No identifiers allowed directly after numeric literal../assets/data/players.js...
View ArticleTypeScript Error 7053 - Creating a custom React component that overrides...
Here is the code for my custom component. Getting an error that it doesn't like that I gave 'type' the type of string. What is the proper way to define what 'type' is? I'm assuming I would need to...
View ArticleHow can I improve this? using typescript
const ProgressBarVertical: React.FC<ProgressProps> = ({ Levelorder, currentLevel, }) => { if (Levelorder === 0) { switch (currentLevel) { case 0: return <View...
View ArticleHow to change font base on props and set default if there is no prop
The question is pretty simple, i have a text, which have a default prop, fontSize, problem is i want to have props to change that size when needed, so i set default font and a props to change font, but...
View ArticleReact Native - Blank Expo screen when importing my lib
I've been working on a React Native component library for a couple months, and everything worked fine until I added a Sliding Up Panel (built from scratch). This lib aims to provide basic components...
View ArticleCannot create a React Native + TypeScript app by following official directions
With the following context:$ node -vv14.8.0$ npm -v6.14.7$ yarn -v1.21.1$ tsc -vVersion 4.0.2and following the instructions here: https://reactnative.dev/docs/typescriptI tried to create a React...
View ArticleReact Native @gorhom/bottom-sheet snapPoint error
I have a bottom tab sheet in my react native app and I cant get it to close by default.I have tried adding 0 as the first snapPoint value, but I believe the library has been updated and I'm not sure...
View ArticleHow to create and download .ics ICalendar file for multiple events in spfx...
I have created a spfx react application for calendar where I need to export the calendar events i.e. to download the calendar events as .ics file on button click.Note:- I need to to export multiple...
View ArticleReact Native / Styled Components - Theming
hope you're doing ok.So, I'm trying to create a theme switcher in RN with styled-components;When I toggle my theme switcher nothing happens.I've created the following hook:import React,...
View ArticleReact Native - Cannot find module X or its corresponding type declarations
I have recently setup a react native typescript projectI have been trying to get absolute paths working with the setup guide here. But no matter what I seem to do I continually get the error Cannot...
View ArticleParse navigation prop from component level to saga generator function via...
I am looking for ways to parse navigation prop from component level to saga generator function via action payload?For example, I have the navigation prop inside my LoginScreen:const LoginScreen:...
View Articlegetting error `malformed calls from JS` when using...
I am using react-native-community/datetimepicker to select a date. It works fine when I select a date for the first time. But if I again try to open datepicker then it is giving me error.Below is my...
View ArticleHow do I reset a screens state to its initial state when using react navigation?
I want to reset the state (back to initial state) in a functional component when navigated via navigation.navigate().Say a user navigates to an A screen and some state is set, then they click a button...
View Article