Ans:
- JSX is an HTML-like markup syntax, but it is not actual HTML.It is mainly used in React to build user interfaces.
Ans:
- Props are data passed from parent component to child component and in is immutable..
- state is mutable data managed within a component.
Ans:
- The useState hook is a built-in hook in React that allows functional components to manage and update state.
Ans:
- Using Lifting State Up, Context API
Ans:
- using onClick={}
function Button() {
const handleClick = () => {
alert("Button clicked!");
};
return <button onClick={handleClick}>Click Me</button>;
}