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

Write Default Text on Native-Base Input

I am calling a component like this by passing a string to it:<TripsPage startingPoint={startingPoint} />Now in this component, I have this label:<Item...

View Article


Image may be NSFW.
Clik here to view.

Add 2 buttons in the same line

How can I use Native Base buttons in a way that they both appear to be in the same line? Currently, the second button is on the right as it should be, but it appears a bit lower than the first button....

View Article


Pass Values From One Modal To Another

I am using these in one of my modals:const [startingPoint, setStartingPoint] = useState('');<Input placeholder="Start" onChangeText={inputText => setStartingPoint(inputText)}...

View Article

Image may be NSFW.
Clik here to view.

Add connecting line between two input fields

I am using native base input fields like this:<View style={scaledAvailableTripsStyles.searchFieldContainer}><Item fixedLabel style={scaledAvailableTripsStyles.searchField}><Input...

View Article

Formik Validation for React Native Input Field

I am using native base's input field and am trying to validate it using Formik and Yup. However, no validation is happening so far. It doesn't show any errors even if I type alphabets.const...

View Article


Reset Input Values Upon Exiting

I am using native base input fields in my app like this:const [startingPoint, setStartingPoint] = useState('');const [endingPoint, setEndingPoint] = useState('');<Input placeholder="My Input Value"...

View Article

Image may be NSFW.
Clik here to view.

React Native TypeScript: Unable to resolve module (but it exists)

I have a fresh React Native 0.61.1 project with TypeScript. It used to display the new project welcome screen perfectly. I've added a class, tried to import it (it even autocompleted), but it says the...

View Article

Typescript: property "title" does not exist on type 'never'

I am practicing React-native typescript. I fetched the data from jsonplaceholer API and added to my component state. After mapping the state and try to render on my mobile. But I am getting typescript...

View Article


Formik Validation for Native Base Input

I am using native base's input field and am trying to validate it using Formik and Yup. However, no validation is happening so far. It doesn't show any errors even if I type alphabets.Schema:const...

View Article


React Native - make dummy db get real data from api

I am quite new to React Native and JS and have recently purchased a React Native template which has a Dummy DB.Ideally Id like it to pull data from an external JSON (api) which is being generated from...

View Article

How to detect checkbox checked or not using react native?

In my scenario, I am trying to write a logic for checkbox check or uncheck. if check means need to print some string or uncheck mean need to print something else. how to achieve this using react...

View Article

reset values before running next mutation

I am running a graphql query inside getFriendId()that returns an id, followed by a mutation (inside addFriend(), which uses the id, along with an input (email) that the user types in. The problem is...

View Article

fetch request works in componentDidMount but bot in seperate typescript file

I Have a React Native app configured with typescript.Tried to do a simple fetch: fetch('https://accounts.ea.com/connect/auth?client_id=FIFA-20-WEBCLIENT&response_type=token') .then((res) => {...

View Article


How to resolve this loader issue in React?

I wanted to use this popup component from GitHubI installed it using npm (I don't know how to do it otherwise).I imported it to my App.jsimport { Root, Popup } from 'popup-ui'After importing it, I get...

View Article

React Native SyntaxError in node_modules/react-native/index.js: Unexpected...

I have initialized a react-native-project and converted it to use TypeScript. I also setup the project to compile to web, android, and ios. Webpack was installed to launch the web version. I got...

View Article


Cannot find module 'graphql-hooks' or its corresponding type declarations

What can I do to install graphql-hooks in react-native TypeScript? How can I define the types? I have already installed using npm but that doesn't work.

View Article

LazyQuery Starts Running Before It's Called

On my front end, there's a text field where the user types in the email and a button.I am running a graphql query loadUsers(), which takes the email as an input variable. I am calling it inside my...

View Article


Default Typescript React-Native project gives 200 errors

I have created a react native project with the following command.VS Code gives about 200 ts errors in the Problems section but I am able to compile with tsc.npx react-native init MyApp --template...

View Article

Mocha Typescript React-Native `unexpected token

I'm trying to run mocha testing with React-Native and my app is built in Typescript. It's an Expo app in a yarn workspace (if that matters).When I run the tests with mocha -r ts-node/register...

View Article

LazyQuery Works Only Once

There's a text field where the user types in the email and a button. For now, I am trying to use a hardcoded email value. I am running a graphql query loadUsers(), which takes the email as an input...

View Article
Browsing all 6212 articles
Browse latest View live


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