Q: What are React hooks? A: React hooks are functions that allow functional components to utilize state and other React features. Q: What are the rules for applying hooks? A: Rules include using hooks at the top level and avoiding placement inside loops or conditions. Q: Which hook is used to implement lifecycle methods? A: The useEffect hook replaces lifecycle methods for side effects in functional components. Q: What is the syntax of the useState hook? A: The syntax is const [state, setState] = useState(initialState);. Q: Compare useReducer and useContext. A: useReducer manages complex state logic, while useContext is for sharing values like themes. Q: How are hooks used for optimization? A: Hooks like useMemo and useCallback optimize performance in React applications. Q: What are custom hooks, and when do we use them? A: Custom hooks are functions using hooks, created to reuse stateful logic across components. Q: How can shared state be achieved between components using hooks? A: Shared state between components is achieved by using the same custom hook. Q: How do you use useEffect to call a loading function just once? A: Pass an empty dependency array: useEffect(() => { /* loading logic */ }, []);. Q: Compare useState and useRef. A: useState manages state, while useRef is for accessing and interacting with a mutable object without causing a re-render.
@mohimakhatun5 ай бұрын
Thanku
@akshaybachkar36755 ай бұрын
thnx
@kunalblg Жыл бұрын
Kindly share the answer also please. And if possible, kindly make video on React Forms and Authentication & Authorization in React. Like to learn from your video. Thanks.
@adityaa230310 ай бұрын
what are react hooks. rules to apply hooks. hook used to implement life cycle method. syntax of usestate hook. usereducer vs usecontext. hooks use for optimisation. what are custom hooks and when we use them. shared state between component utilizing the same hook. how to use useeffect to call the loading func just once. usestate vs useref.
@gobicorner5 ай бұрын
thank you so bro
@beingMeditative5611 ай бұрын
Very informative, Thanks
@smartgowthamrazer7 ай бұрын
Thanks yaar very useful videos!!!
@Shivamashish523611 ай бұрын
Goodone Nisha plz.. make more videos on react interview
@pulkitshukla9944 Жыл бұрын
Hi Nisha, I'm familiar with most of the answers to these questions. Now I'm in a dilemma whether I'm well prepared for the Interview or are these questions just basic/ easy?
@diwakardayal95410 ай бұрын
nice thanks
@argkmr9 ай бұрын
Inka ans bhi bata dete toh acha rehta 🙂
@shreyashjain14757 ай бұрын
😂😂😂😂😂😂😂😂😂
@PrinceYadav-gl1pg7 ай бұрын
Try to add answers too...maybe in comments or description
@aviad575 ай бұрын
Q: What are React hooks? A: React hooks are functions that allow functional components to utilize state and other React features. Q: What are the rules for applying hooks? A: Rules include using hooks at the top level and avoiding placement inside loops or conditions. Q: Which hook is used to implement lifecycle methods? A: The useEffect hook replaces lifecycle methods for side effects in functional components. Q: What is the syntax of the useState hook? A: The syntax is const [state, setState] = useState(initialState);. Q: Compare useReducer and useContext. A: useReducer manages complex state logic, while useContext is for sharing values like themes. Q: How are hooks used for optimization? A: Hooks like useMemo and useCallback optimize performance in React applications. Q: What are custom hooks, and when do we use them? A: Custom hooks are functions using hooks, created to reuse stateful logic across components. Q: How can shared state be achieved between components using hooks? A: Shared state between components is achieved by using the same custom hook. Q: How do you use useEffect to call a loading function just once? A: Pass an empty dependency array: useEffect(() => { /* loading logic */ }, []);. Q: Compare useState and useRef. A: useState manages state, while useRef is for accessing and interacting with a mutable object without causing a re-render.
@PrinceYadav-gl1pg4 ай бұрын
@@aviad57 Thankeew you man.
@SaaralMazhai6 ай бұрын
Are u married?
@softmedun6794Ай бұрын
Babu koi or kam kr lo tumse na ho payega m samjh gya 😅 kyunki tum larki ho , or vaise v tum log ka dimag pair ke niche hota iaslie , ghar me khana banana sikh lo sasural me kam kam aayega 😂
@pulkitshukla9944 Жыл бұрын
Hi Nisha, I'm familiar with most of the answers to these questions. Now I'm in a dilemma whether I'm well prepared for the Interview or are these questions just basic/ easy?