title: How to prevent navigating back on button click in React native?
body: <p>I want to achieve the following things.</p>
  <ol>
  <li><p>Enter username and password and log in on button click.</p>
  </li>
  <li><p>Validate the above things.</p>
  </li>
  <li><p>Navigate to a new screen and print the input values username and password in new screen.</p>
  </li>
  <li><p>A logout button and on click navigate back to the login page.</p>
  </li>
  <li><p>Prevent login again just by clicking the button in the login page without inputting username and password.</p>
  <p>I have completed the first 4 things but I don't know how to implement the last functionality in React native.</p>
  </li>
  </ol>