/React Native RefreshControl | Pull to Refresh functionality | React Native tutorial for beginners

React Native RefreshControl | Pull to Refresh functionality | React Native tutorial for beginners

Video: React Native RefreshControl | Pull to Refresh functionality | React Native tutorial for beginners


okay friends today we will create pull-to-refresh inside our flat list you can see we have a categories and we are fetching product by Json and here our flat list we will make it refresh-able when I put two down it will refresh automatically okay first of all we have to import that component is refresh control okay X inside your that list or list view you will use afresh control and catch your refresh control and paint on speed value refreshing refreshing here I will define speech later fishing second man on refresh yes will be our predefined function we will make it this not OH refresh dot bind in this assault ang we have to blow this refresh control okay and now we need this functional component you can create here and you can see some warning dot very we will fix all inside refresh function you will sense page refresh be flashing proof what it is this one for this video ok we have to define here and your fixed data function which contained array of your product s dot r dot and function and well function compute is curly brackets here you will see it a refreshing polls because when we fetch this function successfully then refresh disabled ok otherwise is true that means refresh personality will be unable ok now let me test reload click on any category and if I pull this you can see can't find we have a fat data because we are using this and we have to define this function sure just put this before your function refresh reload the app click on any category try to pull to down okay I think it's not be loaded click on a category and let me refresh and you can see it's working yeah I will show you I have a admin panel of this product by PHP my website and this is the first product and let me dismiss this all and second one is this ok I will edit this first one and make it just K in the name update product ok now we will see to here if i refresh this ok you can see it's working now if I change the price you can see update reload and is working now time to fix that warning guys if you click here you can see here is warning failed to props type the props refreshing is marked as required because we have define here so we have to declare its default value so just copy this and inside your spit make its default value is false by default we don't need any refresh just reload click on any category and refresh and you can see nothing is warning no error and sure product will be saves automatically just added the name let me see just add it update refresh now you can see okay now I am inside the automobile category and we have a two product of automobiles and two product of Elder electronics now let me change this category of this product to auto mobile so we will see three product of auto mobile okay now make it a tomboy appetit product let me see if i refresh we must read three product here now new product will be this one refresh ok guys now you have a three product and it's your new product ok thank you guys see in the next video if you like my work please like the video if you have any query please comment thank you guys.

READ  Cách tăng lượng người theo dõi FB đơn giản nhất -Easy way to be "famous" with "more Follower" on FB