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

Asset.loadAsync(moduleId) throws with `Error: resource id #0x0` on Android in...

Expo asset's Asset.loadAsync(moduleId) throws with Error: resource id #0x0 for a desired .xml file on Android in Release mode. It works in Debug mode. The strange thing is that for .glb files, it works...

View Article


React Native App: White bar blocking bottom of AppIntroSlider on one device...

I'm working on a React Native app that utilizes an AppIntroSlider component from RN. On one device (Acatel A30) the whole screen seems to work perfectly, but on another device (pixel 3 XL) there is...

View Article


TypeScript - is it possible validate string types based on pattern matching...

Consider the following component, which uses a library called styled-components to create a prestyled Text component:const StyledText = styled(Text)` font-family: Roboto; color: ${(props: ITextProps)...

View Article

Pass custom props to react-native-bottom-sheet

I use https://gorhom.github.io/react-native-bottom-sheet/ with typescript in my project and I also use CustomBackground for my bottom-sheet :interface ICustomBackgroundProps { bottomSheetindex:...

View Article

react-native-dotenv with multiple enviorments only runs local env in react...

i'm trying to expo start my react native with typescript app on 3 different environments-development, local and testing. but when i run APP_ENV=testing expo start or APP_ENV=development expo start it...

View Article


Image may be NSFW.
Clik here to view.

mqtt: net.createConnection is not a function

I am following this guide: https://www.npmjs.com/package/mqtt#install and to try to get an mqtt connection, but I am getting a render error saying_$$_REQUIRE_(dependencyMap[1],...

View Article

React useState() - adding new element in array not working

I am making chat app using React native and socket.io but when I receive a message I want to add to array of messages. But somehow its not working. It replaces the array elements instead of...

View Article

how to have flat list render only once?

I am trying to print the ComponentTwo Flatlist only once but instead, I am getting the result image1 but instead, I need it to appear like this image 2. I have attached a snack link with the code in...

View Article


React Native TypeScript Error: Module '"react-native"' has no exported member...

I've recently implemented dark mode into my app, but having an issue with an error when building the npm package with npm build. The code works, but is there a way or a reason to remove this...

View Article


Disabling a list item with a toggle switch

I am trying to disable the text under a toggle switch which enables a modal. I want the modal to show when the toggle is enabled and disabled when not.The code is below.const PrivacySecurity = (props:...

View Article

Image may be NSFW.
Clik here to view.

react native - render big FlatList with numColumns

FlatList is having issues, when I render many cells on the screen.Please take a look at the below image first.Let's say we have:A map with row x column = 80 x 80 = 6400 cellsA button to enable and...

View Article

How to navigate to different screens by clicking on different FlatList items,...

I am using flatlist to display the 4 engineering departments. Upon clicking on each item I want to move to a new page that displays its timetable, i.e. on clicking "Electrical Engineering", a new page...

View Article

Getting error while i am trying to run "npm install"

npm ERR! code E401 npm ERR! Unable to authenticate, need: Bearer authorization_uri=https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47, Basic...

View Article


Params undefined from StackNavigator to BottomTabNavigator with Typescript...

I have a problem when i want to pass some data from my stack navigator that contain 3 screens : Home / Result and my BottomTabNavigator(BTN). In my BTN i got 3 screens too.I make a navigation between...

View Article

How to pass props in child component in react native with typescript

I have a parent component:const [OTPNotify, setOTPNotify] = useState("flex");const closeOTPNotify = () => { setOTPNotify("none");}<OTPRibbonComponent onCancel={closeOTPNotify}...

View Article


JSX expressions must have one parent element React Native .map

I'm trying to insert Markers and Circles on a MapView in React-Native.When I insert these two together I receive the following error JSX expressions must have one parent element.I've tried to insert...

View Article

How to pass props with navigation in react native using typescript

I have a login page, after logging in I am able to navigate to my home page. But I also want to pass props when navigating to home page.Login Page:const [daysLeft, setDaysLeft] = useState(14);const...

View Article


Remove duplicates from an array of objects based on time created

I have an array of objects and there are some duplicate objectsconst data = [{"id": "1011","name": "abc","Dob": "3/2/11","timeCreated": "16:03:41"},{"id": "1012","name": "xys","Dob":...

View Article

Types for Higher-order component with Styled components

I'm trying to create a factory function to create components, but I cannot get the types correct.Below I use it with Inner, but ultimately, I would like to be able to use this function with any...

View Article

TypeError: Cannot read property 'replace' of undefined - Not sure where it's...

When I run my expo project I am getting a console warning stating.TypeError: Cannot read property 'replace' of undefined at matchFileNameOrURLFromStackTrace...

View Article
Browsing all 6287 articles
Browse latest View live


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