Skip links

Debugging Errors in React Native

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 […]

React Native Folder Structure with React Navigation & Redux

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 […]

Props & State in React Native

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 vs Class Component in React

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 […]

React Native State

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 [...]

Solved: CocoaPods could not find compatible versions for pod “FlipperKit/CppBridge”:

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 […]