UseState in React Native

preview_player
Показать описание
Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.

All the learning resources such as code files, documentations, articles and community discussions are available on our website:

You can find our discord link, github link etc on the above website.

Рекомендации по теме
Комментарии
Автор

This video did feel easy to grasp to some extent. But i have a question, why did you write all the useState statements inside the App() function and not outside it? Overall the video series is going great for me and i appreciate the efforts that you put in to create such high quality videos. Cheers! 😃😃
UPDATE: (asked Chat GPT about it)
In React, the useState hook is used to declare state variables in functional components. These state variables are local to the component in which they are declared, and their values can change over time, triggering a re-render of the component.

The reason why useState statements are written inside the App function and not outside it as a global variable is because state in React is meant to be associated with a specific component, and it should be managed within the component where it is needed. If you declare state variables as global variables outside the component, those variables would not be associated with any specific component, and you would lose the benefits of React's component-based architecture.

By declaring state variables inside the App function, you ensure that these variables are local to the App component. This allows React to manage their lifecycle, trigger re-renders when the state changes, and provide a clear separation of concerns between different components in your application.

In summary, the use of useState inside the App function is in line with React's principles of managing component state within the component itself, and it helps in maintaining a clear and modular code structure.

rehandev
Автор

you are doing a great job, also thank you for your effort and your team's effort, the thing is a small video everyday is not working for me, i need more content in less time to give it my time and effort, but anyway thank you and keep going❤

mazenfayez
Автор

Thanks for making such type of amazing videos.🙂

gouravjain
Автор

Clear explanation enjoying the playlist sir.

wazrymohamed
Автор

Please make a one video in detail about-Roadmap of how to become skilled full stack data scientist.

akshatmehta
Автор

Amazing tutorial Sir but please increase the duration video or cover more topics in the video.

jainvinay
Автор

Thanks for sharing sir Hitesh, Following.

programmingholic
Автор

nice been looking for a RN tut for a while now

abdulrahmanagboolaosho
Автор

Sir Mark My your legacy will be cherished till eternity!

prakharsinha
Автор

i am the person who completed 100th liked

roundupcode