How to detect system Light\Dark mode changes in react native? [duplicate]
I've tried using Appearence.addChangeListener withing an useEffect hook in React native to detect changes in system Light/Dark mode, but in Android the listener isn't called when I switch Light/Dark...
View ArticleLoading @polkadot packages in react native app with expo
I am currently working on a react application to complement a web application, and have been tasked with implementing an self-sovereign identity solution using the Kilt.io protocol. This worked fine...
View ArticleReact Native: How can I export a state from one component to another?
So I have this:class Selection extends React.Component {state = { role1: true, role2: false}...Which I want to export to file2 which looks like:class SignUpAdrress extends React.Component {handlePress...
View ArticleHow to map array of objects and return them as a new array of objects sorted...
I'm building my first react-native app and I want to show user some screen of his "followers" separated by categories but to do it I think I have to create new array of objects from this what I have.I...
View ArticleChange text color of TextInput in React Native Paper - for one word only
Let's assume the following is my inputreturn (<View style={styles.container}><TextInput type="outlined" style={this.props.style} onChangeText={this.props.onChange} label={this.props.label}...
View ArticleUnable to use RNFS to read a file despite providing an existing path
I'm trying to follow the 'Usage' example in this repo: https://github.com/rhdeck/react-native-coremlAnd for reference to RNFS:https://github.com/itinance/react-native-fsSo my code is fairly...
View ArticleWhat is ViewStyle and why we have array in ViewStyle in TypeScript
I'm learning TypeScript but today i see a few lines of code like this : const ROOT: ViewStyle = { alignItems: 'center', backgroundColor: color.primary, borderRadius: 8, flex: 1, justifyContent:...
View ArticleHow to add custom query params in ReactNative Auth0 - /authorize url?
I need to add additional query parameters &foo=bar to the /authorize URL. Is there a way to achieve this?const auth0 = new Auth0({ clientId: 'xxx', domain: 'yyy',});And the login method looks like...
View ArticleReact Native: navigate between stacks
i'm working on a react native application. In said application you can also use some badges that can be added to your account with a QR Code Reader.I have a screen that lists all badges with a button...
View ArticleReact countdown timer
I have a countdown timer snippet in react as below:const [remainingTime, setRemainingTime]: [number, Dispatch<SetStateAction<number>>] = useState<number>(0);const [updatedTime,...
View Articlevscode display red underline for spelling in react-native project
I Just cloned a react-native typescript project and I have the configuration of typeScript in the (tsconfig.json), and right now VScode displays some error like thisAny clue what's the problem? or...
View Articleunrecognized font family 'material design icons'
I am getting this error in the React-native typeScript projectI got the solution in iosbut I am not able to see icons in Android const Tab = createMaterialBottomTabNavigator(); export const HomeTab =...
View ArticleReact Native Expo App: Warning: %s(...) is deprecated in plain JavaScript...
Getting a really vague error message when trying to load a screen in my react native app. I'm assuming that the %s was supposed to evaluate to some function name but it is not providing me any info at...
View ArticleReact Navigation stack screen background color not applied
I created a stack with the following code and I'm not getting background on one of the stack screen.<Stack.Navigator><Stack.Screen name={"Welcome"} options={{ title: 'Welcome', cardStyle: {...
View ArticleReact Native - react-hook-form and typescript usage
I wanted to write a generic Input component in react native with typescript for react-hook-form library.type InputTextProps = { name: any, control: any}const InputText: FC<InputTextProps> =...
View ArticleProperty 'confidence' does not exist on type '{ label: string; confidence:...
When I try to destructure the return type of the following function:const coreml = async ( pathToImage: string,): Promise<{label: string; confidence: string} | undefined> => { //body};as...
View ArticleReactNative WebView onMessage() is not triggered
I have a static site hosted on S3 with CloudFront distro on top of it.<WebView ref={webViewRef} scrollEnabled={false} source={{ uri: Config.REMOTE_URL }} // CloudFront URL...
View ArticleReact Native WebView onMessage() is not triggered
I have a static site hosted on S3 with CloudFront distro on top of it.<WebView ref={webViewRef} scrollEnabled={false} source={{ uri: Config.REMOTE_URL }} // CloudFront URL...
View ArticleHow do I make a function execute on a single item within a mapped array...
I am currently working on a React project and am having difficulty with getting a function to work on a single item within a mapped array.I have an array of objects in a different file that look like...
View ArticleProperty 'opacity' does not exist on type 'IntrinsicAttributes' throwing and...
After writing this sentence, typescript file shows an error on below line.React-Native 0.60+There is a new opacity prop that you can pass in:<View opacity={true ? 0.5 : 1}> </View>Error...
View Article