title: is it possible to use useMemo hook inside contitional statement?
body: <p>I was trying to use react hooks inside conditional statement unfortunatly react gives you error for almost all the hooks and its intented as per hooks philosophy.</p>
  <p>and then I tried useMemo hook inside else statement and it worked no errors.
  I googled around for this discrepancy and i didn't find anything promising.</p>
  <p>My question,
  Is useMemo an exception that you can use useMemo in conditional statement.</p>