How to define a model with mobx-state-tree with unknow properties
I have to create a model using MobX-State-Tree that represents the response of an API. The response is like this TypeScript type:type Tree = { question: string, field: string, options:...
View ArticleHow to preload 5 seconds of video before showing it in react-native-video?
How to preload 5 seconds of video before showing it in react-native-video?
View Articleoverflow:"hidden" won't work as expected for child component (React Native)
I have a parent component which I would like to use for every screen of my app, as follows:const ScreenContainer = ({ children }) => { const style = StyleSheet.create({ container: { padding: 20,...
View Articlewhy my react native become .tsx instead .js
so after installing react native using npx react-native init MyProject the project is running and open in emulator but the app file is not app.js instead app.tsx,file strcutureThe question is i am new...
View ArticleGithub actions review dog fails when running aslant with review dig
I am currently having issues running my review dog in GitHub actions. I have been following this tutorial: https://github.com/marketplace/actions/run-eslint-with-reviewdog and this is what I am trying...
View Articlereact native typescript get event target
i am new to react native with typescript and i have a problemi want to get the text from the Text component so it mean when i press the Text i will console log iti cant get the target valuei try also...
View Articleexpo-assets useAssets: Type 'Asset' is not assignable to type...
Following the small example provided by expo-asset's docs, passing an element from the asset array to an Image source prop gives the following typescript error:No overload matches this call. Overload 1...
View ArticleReact Native IOS/ Expo build failing for multiple reasons
A expo build is failing on my computer though it is working on the other developers' laptop. The discrepancies are that he is running another version of IOS on his simulator, we don't see this being...
View Articlehow to stream a video from a streamable google storage bucket with expo-av...
I need to stream a video with the expo-av video component on react native.The issue I'm having is that it has to download the entire video before it starts playingVideo component<Video ref={video}...
View ArticleHaving trouble persisting value in asyncstorage React Native (Typescript)
I am making a button in React Native which should allow the user to change between a light and dark theme:I have wrapped my app in a context:AppSettingsContext.tsximport {fetchThemeFromStorage} from...
View ArticleSelect types conditionally
I have a monorepo with two apps: client and merchant. They share a common stack navigator - authentication, which is nested inside the root navigator.To set screen props for the authentication...
View ArticleHow to apply babel transforms to files from sibling directory in expo project
I have an expo project and some common code in a sibling directory.I previously had common code in myproject/lib/foo.js and changed it to common/lib/foo.js. It doesn't matter whether I use...
View ArticlecreateSharedElementStackNavigator returns navigation.dangerouslyGetState
I'm currently facing an error using the react navigation shared element within my project. When defining the Stack and using Stack.Navigator, it returns an error withnavigation.dangerouslyGetStateI've...
View ArticleReact Native navigation: Screen not updating after login attempt
So I am trying to make a login screen and a home page. If the login button is pressed the requireauth component switches to comp. But I found out that that function is not updating when the button is...
View ArticleRelative import of platform specific ios/android typescript files for...
I have a component that has 2 different designs based on the platform for React-Native: MyComponent.ios.tsx and MyComponent.android.tsx.Although when I import my component into MyView.tsx, it...
View ArticleFetching a formData via React Native
I am writing a very dumb application using React Native / Flask but can't seem to be able to construct the formData. The formData.append function gives me this error:Argument of type '{ uri: any; type:...
View ArticleHow to set minimum and maximum number in TextInput in React Native?
I want to give a min value of 0 and a max value of 100, In between those values user can type, otherwise in between user cannot type. I tried validating the data when the onTextChanged events trigger...
View ArticleHow to render component dynamically in React Native
I have custom tab control in React Native app, which is rendered by dynamic config, like:const TABS = [ { title: 'Tab 1', component: MyComponentOne }, { title: 'Tab 2', component: MyComponentTwo...
View ArticleIntegrating custom Tensorflow ML model in React Native
I created a simple ML model in Tensorflow and tried to integrate it with my React Native app to make predictions directly on the device.I tried following this guide. Unfortunately the app crashes while...
View ArticleES6 Map autoconverted to {}? [duplicate]
In my React Native + TypeScript app, I've defined a bunch of types as follows:export type Streak = { ... marked: Map<number, string>};export type Habit = { ... ... streak: Streak, ...}When I save...
View Article