Focusing the next input after reaching the max length React Native
I want to be able to move the focus from one input onto the next after the user has entered 2 numbers in the input box. Instead of the user manually clicking the next field I'd like the focus to switch...
View ArticleLoading data from AsyncStorage to FlatList after reloading app
I've got a question, how can I load data from asyncStorage to my FlatList after I reload the app?Here is my screen, where I have the data, FlatList and asyncStorage:import { StatusBar } from...
View ArticleHow to call react function from external JavaScript file
I have read this post [ https://brettdewoody.com/accessing-component-methods-and-state-from-outside-react/ ]But I don't understand.that is not working on my source code.it's my tsx filedeclare global {...
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 ArticleIs there any way to prevent screenshot in React Native IOS version 0.63?
Is it possible to disable screenshots in React Native app for a specific page in IOS?I have already used the RN AppState feature to hide the content when the App is inactive or in the background state...
View ArticleReact Node node not found while testing FaC with Jest and Enzyme
I'm building an app in React Native. We recently started using TypeScript in the app and my task is to migrate the unit tests. There is one test that is miracously failing.The app has a <LoginForm...
View ArticleHow to called async function in useEffect after submiting in react native?
I would like once the user click on the submit button for the whole "page" to reload and the useEffect function to be called. The current behavior is that when the user clicks the submit button, the...
View ArticleReact Native: which pattern is best for opening and closing Realm instance?
I need to persist lots of different data objects (nested, with relationships) that are used across several components with Realm (10.1.3) for a react native project (0.63.3).My goal is to have a class...
View ArticleJest cannot find module @env React Native
I'm currently facing some problem I'm using in my react native app https://github.com/goatandsheep/react-native-dotenv for handling .env.Error => Cannot find module '@env' from 'src/api/api.ts'I'm...
View ArticleHow can export a default realm configuration function without getting an...
I'm trying to export useRealm which will enable me to use in other files, e.g redux-thunk.The code i wrote:import Realm from "realm";import { getRealmApp } from "../functions/realmConfig";import {...
View ArticleCannot read property 'id' of null From Realm database
I'm getting an error when I want to export a default realm configuration useRealm so that I will be able to use it other filesimport Realm from "realm";import { getRealmApp } from...
View ArticleJSON response cannot extract variables
Brand new to react-native and typescript!I'm have a bit of trouble extracting JSON response. I was to extract the response and put it into a class as shown below.Here is the request code let...
View Articlehow to change button style by props? [closed]
I want to pass a theme as a parameter to my component button but the style is not being appliedMy Component:interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { theme:...
View ArticleUse typescript in proton native
I am using proton native and I added typescript dependencies to package.json but proton native doesn't recognize it throw a syntax error.Can anyone help me to add typescript to proton native?Note that...
View ArticleWhy is result undefined
I am trying to access a user's details from a get Request but I cannot figure out for the life of me why the I can only log some of the response results...Here is the request:let user = (await...
View ArticleInvalid attempt to spread non-iterable instance. (App which worked fine)
I've got a question about an error below. Everything worked fine im my app, I added sth about 5 lines, this error appears, then I remove that lines but the error didn't disappear. Maybe somebody can...
View ArticleReact native webview can not open links on android
React native webview component can not open links on Android, but on IOS it works fine, without any troubles. Nothing has happening on Android, after the pressing, no any errors. At the same time i...
View ArticleHow can I initialize a class instance in a stateless function component in...
Using a stateful pattern, I usually initialize a kind of helper class in my constructor and consume its methods in some component lifecycle methods like below:class StatefulComponent extends Component...
View ArticleHow to remove Promise from a function? [duplicate]
My goal is to get the data from a method. The method return a Promise<BluetoothDevice[]>.I would like to create a 2nd method to invoke the 1st method. The 2nd method should not return a Promise,...
View ArticleAsync does wait for data to be returned in a redux-thunk function
I've being trying populate my redux store with data that comes from my mongo-db realm database.Whenever I run the function below it will execute fine but the problem is data will be delayed and ends up...
View Article