Tag «Page keeps Refreshing on Button Click»

How to Refresh a Component and Page in React

Sometimes, we want to refresh the page without reloading the page .How to Refresh a Component and Page in React. To refresh a page you don’t need react-router. We want to reload a page by clicking a button. Here’s the example: By using useState() method we can update the component. By using these methods you …