What is the purpose of setState in React? By manikandan on Sun, Mar 17th, 2024, 1:16 pm setState is used to update the state of a component and trigger a re-render. reactjs react Interview Question js js-library javascript frontend w2u way2unknown