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 ArticleReact 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 ArticleTypeScript - 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 ArticlePass 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 Articlereact-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 Articlemqtt: 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 ArticleReact 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 Articlehow 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 ArticleReact 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 ArticleDisabling 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 Articlereact 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 ArticleHow 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 ArticleGetting 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 ArticleParams 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 ArticleHow 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 ArticleJSX 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 ArticleHow 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 ArticleRemove 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 ArticleTypes 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 ArticleTypeError: 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