Skip to main content

React Native Notes

React Native Notes



Flatlist Vs ScrollView:

    Flatlist when you have infinite data then it will boost your apps performance.
    ScrollView when you have 20 or less items to display

Why we use key in array render?
- Let's take an ex you have to render posts on ig if key is not present then every time the new post is added to array js will rerender all the posts 
- But if we use key={id}then js will only render the newest post
- And save juicy computational power

Comments

Popular posts from this blog

React Native Full Notes

React Native Full Notes Device Orientation Like Youtube - First Go To App.json and set orientation:: "default"; Then go to project folder and run npm i @react-native-community/hooks import  {  }  from   'expo-status-bar' ; import   React   from   'react' ; import  {  Dimensions ,  StyleSheet ,  SafeAreaView ,  Text ,  View ,  Button ,  Platform ,  StatusBar  }  from   'react-native' ; import  {  useDimensions ,  useDeviceOrientation  }  from   "@react-native-community/hooks" ;   export   default   function   App () {    const  {  landscape  } =  useDeviceOrientation ();    return  (      < SafeAreaView   style = { styles . container } >        < View   style = { {          backg...

Linux Basics Cmd

  Install Package      sudo apt update     sudo apt install discord (Error_?)     sudo apt --fix-broken install  Remove Packages:     sudo apt remove firefox-esr (remove without deleting user data)     sudo apt purge firefox-esr (remove all user data) Update & upgrade :     sudo apt update && sudo apt upgrade     dpkg -l (List insatllled packages)