title: Cypress - difference between find() and within() methods
body: <p>My question is simple: which differences are there between using either of these methods:
  <br /><code>cy.get('.wtv').find('.sub-wtv');</code>
  <br />
  <br /><code>cy.get('.wtv').within(() =&gt; {cy.get('.sub-wtv');});</code></p>
  <p>From the documentation <br />
  <a href="https://docs.cypress.io/api/commands/find.html" rel="nofollow noreferrer">https://docs.cypress.io/api/commands/find.html</a><br />
  <a href="https://docs.cypress.io/api/commands/within.html" rel="nofollow noreferrer">https://docs.cypress.io/api/commands/within.html</a></p>
  <p>they both let us work with a &quot;sub DOM&quot; in which we can do whatever we would like, like searching a specific element and assert it.
  <br />It seems to me that this may be almost as an alias of each other?!
  <br />Can someone clarify this for me? Or point me in the right direction?
  <br />Also, performance wise, is one of them better than the other?
  I do understand that they may have different implementations, but the input and output aren't the same for both?</p>