React JS - Stateful vs Stateless OR Controlled vs Uncontrolled component || Hindi || Coding Scenes

preview_player
Показать описание
Explained: In a controlled component, form data is handled by a React component. The alternative is uncontrolled components, where form data is handled by the DOM itself
#reactjs #reactjsforbeginners #reactjstutorial #reacthindi
Рекомендации по теме
Комментарии
Автор

sir please continue upload vedio u don't know how your vedio help me to understand thing .. and give after that shukoon

ektakumari
Автор

Really excellent explanation sir and kindly make videos react js with typescript because the way of explaining very excellent since I observed other videos also but sir your explanation very crystal this really like it 🙏👌 and more thing as soon as possible kindly make reactjs with typescript best of luck sir soon subscriber will increase definitely ✔️

mahalingappabirajdar
Автор

Wrong

Answer from chat-gpt :

In the scenario you described, where a component manages its own state (5 states) and also receives one prop from its parent to show on the DOM, the component can be considered **partially controlled.**

Here's a breakdown:

1. Managed States:
- The component has five states that it manages internally. Any updates to these states are handled within the component itself.

2. Prop from Parent:
- The component receives one prop from its parent, which it uses to display data on the DOM.

In the context of React's controlled/uncontrolled terminology:

- The portion of the component that relies on its own internal states is controlled because it manages its own state and updates based on changes to that state.

- The portion that receives a prop from its parent and uses it to display data is uncontrolled because it doesn't manage the state of that specific prop; it relies on external data.

So, the overall classification of the component depends on the perspective you're considering:

- Partially Controlled: If you're considering the whole component (including both internal states and the received prop).

- Controlled: If you're specifically referring to the portion of the component that manages its own internal states.

- Uncontrolled: If you're specifically referring to the portion of the component that relies on a prop from the parent.

importntupdtes