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

Image may be NSFW.
Clik here to view.

add radio buttons with custom text

I have a component with icons and some text.const criteriaList = ['New','Freunde',];export const FilterCriteriaList: React.FunctionComponent = () => { //const [checked, setChecked] =...

View Article


Image may be NSFW.
Clik here to view.

remove button outline native-base

I am trying to wrap an icon in a button. Like this:<Button style={styles.radioButton} onPress={() => { console.log('hdjwk'); }}><Icon style={styles.icon} name="circle-thin" color="#31C283"...

View Article


Placing a marker by clicking anywhere on the mapview screen in react native

My problem is, im trying to make my mapView so everytime I tap on it a marker is created and the marker's latitude and longitude are sent to the console in order to send them using fetch, I found...

View Article

Image may be NSFW.
Clik here to view.

TouchableOpacity and onPress for Icons

I am trying to use onPress for icons. For this, I thought of using TouchableOpacity but nothing happens when I click on the icon. I don't see any console logs.I also tried wrapping the icon in an...

View Article

First onchange checkbox execution doesn't run correctly function React Native...

In my first execute my function doens't work.I need a checkbox that adds or subtracts numbers. but it doesn't work on the first run, only on the next ones. console.log () works, but it only adds or...

View Article


change Icon after clicking on it

I have a component that looks like this:const criteriaList = ['Nur Frauen','Freunde Zweiten Grades',];export const FilterCriteriaList: React.FunctionComponent = () => { const [state, setState] =...

View Article

How to set autocomplete for react native elements input on iOS?

I am trying to set correct autocomplete suggestions on my registration form.I am using react native elements input, I have set username, email and password field.On email field I have...

View Article

reset settings of one component from another

I have a screen where I am using some text and another component called FilterCriteriaList which has some custom buttons that change their color when we click on them.On my main screen, I want to press...

View Article


React Native - Invariant Violation: Module AppRegistry is not a registered...

I have started getting this error Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication) since yesterday, my application was working and all of sudden it...

View Article


Handling non null assertions in react native application

I have authContext in my react native application with a token property, it can be string | null.I have some protected routes, meaning I'm not showing links unless user is logged in and token exists.On...

View Article

set Initial State with graphql returned data

I have a redux setup that looks like this:const INITIAL_STATE = { endPoint: { street: '', coordinates: [] }, //[13.3969, 52.5182] startingPoint: { street: '', coordinates: [] }, //[13.413215,...

View Article

extract values from an object with forEach

I run a graphql query and obtain data (data.personalPlaces), an object that looks like this:nodes: (4) [{…}, {…}, {…}, {…}]where each node is like this:0:customisedName: "HomeOfBestFriendAlice"id:...

View Article

calling a function from a const value

I have an initial state const item that looks like this:const INITIAL_STATE = { endPoint: { street: '', coordinates: [] }, //[13.3969, 52.5182] startingPoint: { street: '', coordinates: [] },...

View Article


The value of $input has a wrong structure., Location: [object Object], Path:...

I am trying to run a graphql mutation. On the playground, it works like this:mutation { addFavouritePlace( input: { center: { coordinates: [4, 9], type: POINT }, customisedName: "School", placeName:...

View Article

Usage of React Native Debugger with typescript

To setup React Native debugger we have to declare a composer like this:const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || composeconst store = createStore( rootReducers,...

View Article


How can I get a value from an array, when the person clicks, to send it to a...

To explain a bit, I have an array that shows me all the providers and the name of each one {orderByProviderBrand && this.sortingByAlphabet().map(r => { return (<div key={r.id}...

View Article

Property 'scrollToIndex' does not exist on type 'FlatList'

I'd like to understand the reason for this warning/error: 'Property 'scrollToIndex' does not exist on type 'FlatList<School>'I have a React Native Snap Carousel list that should be scrolling...

View Article


react native country code prefix for text input

Trying to set up a form that takes a customer's address and phone number, but the API only accepts the phone number with the country code attached. So I need to add it in through the code.I've tried it...

View Article

Typescript issue in Styled component Button ( React-Native )

this code :import React from 'react';import styled from 'styled-components/native';const Button = styled.Button` color: palevioletred;`;interface Props {}interface State {}export default class App...

View Article

Avoid object is possibly undefined

I'm trying make an Input that can handle array(so inputs are dynamic n+) with formik in react native. It works but typescript complains with "object is posibly undefined" and "Element implicitly has an...

View Article
Browsing all 6213 articles
Browse latest View live


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