React Hook, Hooks, React.
id:items.length, value:Math.floor(Math.random()*10)+1 }]) } return ( <div> <button onClick={addItem}>Add Item</button> <ul> {items.map(item => ( <li key={item.id}>{item.value}</li> ) )} </ul> </div> ) } export default UseStateArray 2.useEffect() Hook:The Effect hooks let you perform side effects in