Рет қаралды 4,421
useState is one of the most important and common hook that we use in our Functional Component.
States are very important part of a component as it allows us to add dynamic behaviour in our component. Whenever there is an any change in State component re-render and reflect the changes on UI.
Props and states are 2 important concept that allows us to handle data for a component.
Props : It pass data from parent component to child component and it is only readonly
State: It is local to component so can't be use outside to a component.
useState is a predefined hook and need to import from 'react' package before using it.
Syntax: const [state, setState] = useState(initialSTate);
Watch the complete video till the end to understand it completely and in next video we will cover more advance stuff in useSTate.
Checkout my Instagram account to find the latest notes on React, Angular and Javascript.
Instagram handler Name: @nishasingla05
Watch complete video to understand in depth.
Support my channel by liking and sharing my videos so that I can reach to wider audience. Please share it in your network 🙏
►Checkout previous video Hooks
• Hooks in ReactJS: Wha...
►Project Setup using create-react-app
• ReactJS Tutorial: What...
►Virtual DOM and Real DOM
• ReactJS Tutorial: What...
►ReactJS Introduction
• ReactJS Tutorial - Int...
►Click here to Subscribe the channel:
studio.youtube....
►JavaScript Course with ES6 Features-:
kzbin.info....
►Angular Complete Course:
kzbin.info....
►All important shorts videos:
kzbin.info....
Connect with Me On Social Media
Facebook: / angularjs4be. .
LinkedIn: / nisha-sin. .
Instagram : / nishasingla05
Twitter: / nishasingla05
#nishasingla #react #javascript #hooks