Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

refresh page by hand in react

import React from 'react';

function App() {
  
  function refreshPage() {
    window.location.reload();
  }
  
  return (
    <div>
      <button onClick={ refreshPage }>Refresh!</button>
    </div>
  );
}

export default App;
Source by shouts.dev #
 
PREVIOUS NEXT
Tagged: #refresh #page #hand #react
ADD COMMENT
Topic
Name
9+4 =