First Try – Clear Cache with npx react-native — –clear-cache Second Try – Clear Gradlew – cd android and then ./gradlew clean Third Try – Try Browser Debugging with https://reactnative.dev/docs/debugging Fourth Try – (If the project is not working at all) – Run Doctor with npx @react-native-community/cli doctor Fifth Try – Remove node_modules and install […]
Please follow the steps! Step 1 – Open your project folder android/app/build.gradle and under defaultConfig update versionCode and versionName Increment your previous versionCode and versionName by 1.
In the next 10 minutes, I will showcase how I manage the react-native folder structure. Let’s create and run a react native project first. Create a New React Native Project npx react-native init MyProject Running React Native App react-native start Start your application react-native run-ios react-native run-android Create src folder in root directory api urls.js […]
Very Common Issues While running android emulator from react native using: No emulators found as an output of emulator -list-avds Solution: then run, adb devices and you will find your emulator ! then run Now your project will run successfully on Android Emulator.
Props Props is short for “properties”. Props let you customize React components. For example, here you pass each <Cat> a different name for Cat to render: State Functional Component State and Class Component In class component state is stored as an Object.
Functional Components Class Components A functional component is just a plain JavaScript function that accepts props as an argument and returns a React element. A class component requires you to extend from React. Component and create a render function that returns a React element. There is no render method used in functional components. It must […]
import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; // class component export default class App extends React.Component { state = { myState: 'some state informaiton stored' } updateState = () => this.setState({ myState: 'The state is updated by onPress event' }) render() { return ( <View style = {styles.container}> <Text>Open up [...]
Getting this or a similar error while running installing pod for the first time? Error [!] CocoaPods could not find compatible versions for pod “FlipperKit/CppBridge”:In Podfile:FlipperKit/CppBridge (= 0.99.0) None of your spec sources contain a spec satisfying the dependency: FlipperKit/CppBridge (= 0.99.0). You have either: out-of-date source repos which you can update with pod repo […]