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

npx react-native run-android receiving "Task :app:compileDebugJavaWithJavac...

Trying to learn using react-native and running into an issue that I cant seem to get around. I am trying to make sure my boiler plate file will render on android studio emulator and am running into the...

View Article


"parserOptions.project" has been set for @typescript-eslint/parser

I created a new React Native project with --template typescriptI deleted the template directory which came as part of the boilerplate.I then proceeded to add ESLint:module.exports = { parser:...

View Article


Image may be NSFW.
Clik here to view.

['type aliases' can only be used in a .ts file]

I use command react-native init "name project" then open vscode appear to have error message code. (image)

View Article

Why my FlatList in React-Native doesn't update, even after adding extradata?

For the last couple of hours I am trying to make simple list, that you can expand by typing something into text field and pressing button. But it doesn't update my FlatList, even after changing content...

View Article

How do I build app with :app:bundleReleaseJsAndAssets error?

I need help, I need to fix this error when building apk using gradlewassembleRelease, the configuration is successful, but when executing at 70% there throws an error:> Task...

View Article


Image may be NSFW.
Clik here to view.

How to declare SCSS type attribute selector by REACT property

Basically I want to create a reusable component which can be slightly modified from the outside in react:SomewhereElse.tsx...<FooComponent width={200}>...FooComponent.tsxinterface IFooProps {...

View Article

check shape of object returned by grapqhl query

I am running a GraphQL query which returns an object. I'm certain that an object is returned but when I try to print response on the console, I get undefined try { const response = await loadUsers({...

View Article

overwriting react-native stylesheets styles

I have a custom react component that looks like this:import { StyleSheet } from 'react-native';import { Input, Item } from 'native-base';import Icon from 'react-native-vector-icons/FontAwesome';import...

View Article


Detail list refreshing issue after sorting on checkbox change event

I have implemented the sorting functionality ,I have used constructor to initialize the state and componentDidUpdate to update the state with new items. constructor(props) {this.state = { items:...

View Article


Formik button not disabled initially

I am using Formik validation and I am trying to disable the button if the validation schema is not fulfilled. It's supposed to be a phone number so if I type alphabets, the button is disabled. It...

View Article

pass custom attribute to

I have a custom component that I have built using Native-base components like this:export const FieldInput: React.FunctionComponent<FieldInputProps> = ({ handleChange, handleBlur, fieldType,...

View Article

react native vector icon name property

I have a custom component that looks like this:import Icon from 'react-native-vector-icons/FontAwesome';export const FieldInput: React.FunctionComponent<FieldInputProps> = ({ handleChange,...

View Article

Disable eslint(no-use-before-define) eslint rule on typescript

I'm, trying to disable the rule eslint(no-use-before-define) on variables in typescript because in react-native the styles are used after the component declaration, and even though the...

View Article


How to omit one property from interface, but not with type in TypeScript?

I need to make one interface that extends from 2 another, but I get the error: Interface 'IModalProps' cannot simultaneously extend types 'ModalProps' and 'ModalRNProps'.   Named property 'onShow' of...

View Article

Material-Table make clickable

I'm using material-table to create a table from an array of products. https://material-table.com/#/docs/all-propsHere is my current code.<MaterialTable title="" style={{boxShadow: "none"}}...

View Article


React export stylesheet

I would like to create an external stylesheet using the MaterialUI 'makeStyles' and 'createStyles' like you can in React Native however, I don't know how to do it.export const useStyles =...

View Article

Image may be NSFW.
Clik here to view.

@react-navigation/native upgrade to V5 SyntaxError

I am having some trouble with upgrading my react-navigation from v3 to v5. I keep running into this error, at first I thought it was a bug but I am not finding any other complaints online about it. To...

View Article


Image may be NSFW.
Clik here to view.

React Native - how to declare a StyleSheet property in an interface in...

I have a functional component in React Native which receives some properties, how can I declare StyleSheet type of property in TypeScript?

View Article

TypeScript React Native Flatlist: How to give renderItem the correct type of...

I'm building a React Native app with TypeScript. renderItem complains that the destructured item implicitly has an any type. I googled and found this question and tried to implement what they teach...

View Article

How test a function that has been called or not in jest

This is my example code, here I need to test the regenerate function after component mounts and I need to make sure that qrCodeUrl has been changed or not for Qrcode componentexport function generate()...

View Article
Browsing all 6212 articles
Browse latest View live


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