
Price: 3106

Price: 3381

Price: 1053

Price: 3159

Price: 1275

Price: 442

Price: 2710

Price: 1620

Price: 3646

Price: 2495

Price: 3513
React is a declarative, efficient, and flexible JavaScript library for building user interfaces. It lets you compose complex UIs from small and isolated pieces of code called “components”
Basically react creates a virtual DOM and Instead of manipulating the browser's DOM directly. Virtual DOM is react object and Browser DOM is browser object.React allows you to effectively re-construct your DOM in JavaScript and push only those changes to the DOM which have actually occurred. where it does all the necessary manipulating, before making the changes in the browser DOM. then changes only what needs to be changed.
Mainly State allows us to manage changing data in an application. It's defined as an object where we define key-value pairs specifying various data we want to track in the application.
useState is a Hook that allows you to have state variables in functional components. You pass the initial state to this function and it returns a variable with the current state value (not necessarily the initial state) and another function to update this value.
useState enables you to add state to function components. Calling React.useState inside a function component generates a single piece of state associated with that component.
const [state, setState] = useState(initialState);