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

Spread operator while using a react props interface with TypeScript

I have this AppText component where I want to use a Props interface while having the ability to accept other props fields that I can consume with a spread operator. Here is my attempt...

View Article


Is there are way to optimize typescript theme generation?

I'm developing React/React Native theme provider and want to have ability to specify spacing style properties base on sizes I define in theme. My current type of theme spacing looks like:export...

View Article


When to use useCallback?

I have gone through a couple of articles on useCallback and useMemo on when to use and when not to use but I have mostly seen very contrived code. I was looking at a code at my company where I have...

View Article

Must set exactly one of itemVisiblePercentThreshold or...

Im building an ecommerce app, I have encountered an error.I guess the error is caused because of line 34.the error is (Must set exactly one of itemVisiblePercentThreshold or...

View Article

Image may be NSFW.
Clik here to view.

drop down menu hiding behind content

I have a screen that looks like this:return (<SafeAreaView><View style={styles.container}><View style={styles.topContainer}><View...

View Article


My useFetch hook is giving me too many re-renders

I'm trying to abstract my fetch out to a hook in my expo react native app. The fetch must be able to do POST method. I started out by trying to use and then modify the useHook() effect found at...

View Article

TypeError: setEmail is not a function. (In 'setEmail(input)', 'setEmail' is...

App.js const[getScreen, showScreen] = useState(false); const[getEmail, setEmail] = useState("");<LoginScreen/><LoginContexts.Provider...

View Article

Is it possible to have a global invisible WebView component passed as...

I am trying to build a custom mobile Front End for a forum that doesn't have a public API and I thought about having a shared invisible WebView that's accesible by a reference through all React...

View Article


How can I create a Context that has a reference inside in Typescript?

I am trying to create a context that has a reference inside it in React Native using Typescript, however, I am getting all sorts of type errors and I do not seem able to fix it. I want it to be null by...

View Article


generator function doesn't resume after yield

So I'm trying to debug why my array of questions is not being properly populated in my mobx-state-tree questions-store. Nothing after the yield statement in the getQuestions action runs.export const...

View Article

Unknown Option error from Babel in React-Native app

I am building a react-native app with typescript in order to learn react native. Once I run the app with expo start and try to run on emulator I get this error:index.js: [BABEL] ......../index.js:...

View Article

Rendering issue when using input form with Boostrap in Typescript

I am currently working on a basic react application using Typescript.The following code is working fine. The code (simplified here) displays a grid of input form. When the use updates the input form...

View Article

Type 'Handles' is missing the following properties from type 'TextInput'

I use React Native Paper and react-native-text-input-mask to show a field for the phone number:// Importsimport {TextInput} from 'react-native-paper'import TextInputMask from...

View Article


Type 'MutableRefObject' is not assignable to type 'Ref | undef

I get the following error when passing a ref to a <TextInput>in React Native:Type 'MutableRefObject<ForwardRefExoticComponent<TextInputProps & RefAttributes> | null>' is not...

View Article

Getting error: 'component' does not exist in type 'FormControlProps'

I am able to set { component: "fieldset", ...param } to FormControlProps:const Temp = () => { const param: FormControlProps = {}; // Able to set `{ component: "fieldset", ...param }` to...

View Article


React Native custom fonts load and display properly in simulator, but break...

I'm currently building my first iOS and Android application in React Native, but can't get any custom font files to properly display when running through Expo. All custom fonts display properly and...

View Article

Why property spreading inside Grid works but doesnt work in FormControl?

The title of the question says it all: Why property spreading inside Grid works but doesnt work in FormControl?But I guess more clarity can only be brought through the code. Please find the detailed...

View Article


All React Native Firebase modules must be of the same version - can't use Auth

I installed RNF from starter kit provided by Invertase. I am using RNF app, database, analytics, auth. Everything worked fine until I needed the auth module. It throws an error on app startup (on...

View Article

Warning: Can't perform a React state update on an unmounted component React...

I don't know why I'm facing this issue. If anyone knows how to deal with it so please help. Thanks in advanceWarning: Can't perform a React state update on an unmounted component. This is a no-op, but...

View Article

Why does property spreading work inside Grid but not in FormControl?

Sandbox here: https://codesandbox.io/s/agitated-ardinghelli-fnoj15?file=/src/temp4.tsx:0-1206.import { FormControl, FormControlProps, Grid, GridProps } from "@mui/material";interface...

View Article
Browsing all 6287 articles
Browse latest View live


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