Type 'Color' is not assignable to type 'string'
I am using npm color package. I am completly new to typescript react-native. Here I am trying to use Color property on shadow color property something like this.const BACKGROUND = "#88B04B";const...
View ArticleReact-native flatlist is sharing props between components on isLoading
I'm currently making a list of items in react-native using flatlist, the issue i'm facing is that its sharing my isloading prop between all instances of the items in the list. meaning that if i click...
View Articlenative base with a line
I am using native base's item and want to style it such that it has a line. Currently, it's simply invisible. All I can see is the placeholder text and if I change the background color, then I can see...
View ArticleType is missing the following properties from type in TypeScript of...
I have installed https://github.com/react-native-community/react-native-modal library and I need to make a wrapper Modal class. The first initialize Interface. It extends from a few interfaces from...
View ArticleUnable to resolve module 'module://graphql/language/parser.js'
I am trying to make a React Native TypeScript project on Snack Expo. Although I have already added graphql in the package.json as well as the types file, I still get this error :Device: (1:8434) Unable...
View ArticleReact Typescript: Add another row of fields to form with button
I'm building a product sales form that allows users to add a product name, quantity, and price. By default I want the form to show 3 rows and if they want to add another product, there would be a...
View ArticleWhy the goBack function doesn't work? React Native
I am new in React Native, I am working on an app where I had to add a prefabricated header, which brings a button to which I want to set the option to go back with the function goBack of Navigation,...
View ArticleUnable to resolve "./SafeAreaContext"
I recently set up react-native project with expo and later on I added @react-navigation packages.It seems like this wasn't enough as NavigationContainer render complains about SafeAreaContextI tried to...
View ArticleUnhandled JS Exception: Requiring unknown module "9"
So I'm trying to set up the navigation for a log in screen and I've tried relinking dependecies and installing packages all over again and I've only worked on two files. I am working on MacOS and...
View ArticleTS compatibility for libraries with out @types
I am currently trying to install and integrate react-native-credit-card-input on to a typescript project. When I run run npm install @types/react-native-credit-card-input --saveand getting the...
View Articletoo many rerenders on using useState
I am calling the contactsfunction from the main return. I don't see any error until here: const showContacts = React.useCallback( (data: UsersQueryHookResult) => { if (data) { return (<View...
View Articlereset conditional rendering from separate component
Previously I was using the function showUsers and {isSubmitted && showUsers(userData)} to conditionally render some items after a graphql query. In this case, I was using...
View Articleinner return not rendering anything
Depending on what the results of the graphql query are, I am rendering some items in the function contactexport const Whitelist: React.FunctionComponent = (props) => { const [userData, setUserData]...
View ArticleMove Conditional Rendering to a Separate Component
In my code, I take an input from the user, run a graphql query and then conditionally render some items according to the results (via showUsers functions). However, instead of using showUsers here as a...
View ArticleHow to properly prevent TextInput blur on react-native?
In order to make a custom input, I had to create an InputWrapper to apply common style and add some animation behavior:import React, { ReactElement, useState, useEffect } from 'react';import {...
View Articletoo many re-renders when data moved to a separate component
Currently, I am using this logic to render data on the basis of results from a grapqhl query. This works fine: const contacts = () => { const { loading, error, data } = useUsersQuery({ variables: {...
View ArticleReact question about geofire and useEffect
Hi I have question about react, I don't have much experience. I'm trying to do a query with geoFire and get the location, after that find the data in my db.Geofire creates an event that I'am subscribed...
View ArticleTypescript not compiling as custom npm package
Actually I have a project hosted in Bitbucket, this project is using Typescript and is required by my react-native app in his package.json file from this way:"@core":...
View ArticlePushing items into an array if dates matches - JavaScript/TypeScript
Shorting array to displayed them with respect to date, Like i did - Hiking, shopping on 2020-05-10 and Hiking , Football on 2020-05-10 and similar for other dates. const items = [ {title: 'Hiking',...
View ArticleFonts are not loaded when UI Kitten wants to use them in React Native project
I am using the UI Kitten library in a React Native project with Typescript.I've created a mapping.json and a react-native.config.js file which look like this:mapping.json:{"strict":...
View Article