Redux-observable dispatching multiple actions
I'm learning to use redux-observable and RxJS in react-native then I face a problem with dispatching multiple actions after performing a Firestore get document request.This is my epic:const...
View Articlehow can I use a state as an array of objects
I have recently started learning React TypeScript, and I am trying to make a Bowling Score application. I thought about state (I don't know much about states, just started learning it) so I can put an...
View ArticleInterface property dependent on other fields
I am making a reusable component for expo-vector-icons. This is the interface so far.import { AntDesign, Entypom, Feather } from "@expo/vector-icons";type AppIconFamilies = { AntDesign: typeof...
View ArticleHow to handle mutation error instead of Apollo onError()
To catch the GraphQL error for a mutation, I've tried the following: (method #1 is working when catching errors for useQuery())const [m, { error }] = useMutation(MY_MUTATION);if(error) {...
View ArticleHow to track how longer user is on app for react native
I am trying to count in minutes and hours how longer a user is on the app for and display it. I have got the app counting minutes I just cant seem to work out how to track when the app is active or...
View ArticleHow to call current temperature from openweathermap with axios
I am trying to do an axios call to get the latest temperature using openweatherapi. However for some reason I cant find out why my axios call is not working. Any help would be great, here is my code:...
View ArticleClass 'MonitoringError' incorrectly extends base class 'Error'
Im trying to extend the Error class with the following ( for monitoring with Sentry in React Native ) but get the following error.Class 'MonitoringError' incorrectly extends base class 'Error'. Types...
View ArticleDuplication in Interface property dependent on other fields
I am making a reusable component for expo-vector-icons. This is the interface so far.import { AntDesign, Entypom, Feather } from "@expo/vector-icons";type AppIconFamilies = { AntDesign: typeof...
View ArticleHow to get current temperature using axios
I am trying to get the current temperature from openweathermaps using axios. I can put my url into the browser and it works fine. But when I try do an axios call with the correct url it doesnt event...
View ArticleRemove Warning : [react-native-gesture-handler] Seems like you're using an...
I'm creating a project to learn React Native. I'm using typescript on this project. I added react-navigation : To make react-navigation working, I had to do :yarn add @react-navigation/nativeyarn add...
View ArticleHow to use the useState() with specific strings ("this" | "that")
I am trying to use the useState in React-native with TypeScript and want to use specific strings that can be used in a component. How can I do this?I have this: | \/const [getViewState, setViewState] =...
View ArticleHow to get axios to work with expo (react native)
I am trying to call the local weather from openweathermap in my react native app. I have tested the url in both the browser and the code in a plain react project and it works. However in react native...
View ArticleA propriedade 'id' não existe no tipo 'never'. React Native com TypeScript...
VSCode está apontando dois tipos de erro para que eu possa carregar dados do banco no projeto ReactNative com TypeScript.Meu arquivo: import React from 'react';import { StyleSheet, Text, View,...
View ArticleNo overload matches this call error in TouchableOpacity style
have some problem with TouchableOpacity styles.When I add alignSelf , alignItem or JustifyContent, I get the next error:TS2769: No overload matches this call. Overload 1 of 2, '(props:...
View ArticleExtending react-native-paper components in TypeScript
I'm struggling to extend the react-native-paper components correctly. What am I doing wrong or how to do it correctly? actually, I'm not totally new to Typescript, but I always struggled with this...
View ArticleNavigating without the navigation prop - typescript typings
I'm trying to include React Navigation 6.x into a React Native project with Redux and therefore need to be able to access the navigator from outside components.I'm following this guide (Navigating...
View ArticleReact Navigation 6.x Nested Prop Types
I've been looking at the documentation for type checking navigation screen props, but can't seem to figure out how to write my types.ts file given my nested navigation structure (shown below). Any help...
View ArticleReact-native: Hooks can only be called inside of the body of a function...
Hey i have a problem with my react-native app.I have 3 fileApp.tsx /** * Sample React Native App * https://github.com/facebook/react-native * * @format * @flow strict-local */import React from...
View ArticleReact native styled components align-items not working by props
I am trying to implement a generic FlexRow component to my application to be able to pass direction, alignment and justify-content by props. It is not working out to well and I can't seem to understand...
View ArticleHow to pass prop of a child to another child? (React Hooks)
I need to pass a prop (it's a unique id) from one child component to another, but I can't do it.The operation is simple: Homepage is the parent and has two direct children: Gallery and Detail. Gallery...
View Article