title: Why get scrollIntoView is not a function
body: <p>its a simple question, i just dont understand why i get &quot;is not a function of a lot of ref functions.</p>
  <ol>
  <li><p>i declare use ref variable like so:</p>
  <pre><code> const massageTypeRef = useRef();
  </code></pre>
  </li>
  <li><p>Now I have Text component at the top of the page:
  
  
  Choose type:
  
  3.and i have another button in the bottom , i want when the button clicked, take the user all the way up to the Text component.
  in my bottom button i have:</p>
  <pre><code>  &lt;AnimatedButton
               onPress={() =&gt; massageTypeRef.current.scrollIntoView()}/// 
   here i dont know why i get is not a function
                pass
               icon=&quot;arrow-up&quot;
               buttonStyle={styles.problembutton}
               textStyle={styles.problembuttontext}
           /&gt;
  </code></pre>
  </li>
  </ol>
  <p>i tried a lot of methods like:</p>
  <pre><code>onPress={() =&gt;
                      massageTypeRef.current.scrollIntoView({
                          behavior: &quot;smooth&quot;,
                      })
  </code></pre>
  <p>and:</p>
  <pre><code>onPress={() =&gt;
                      massageTypeRef.current.scrollTo()
                      })
  </code></pre>
  <p>but i always get: TypeError: massageTypeRef.current.scrollIntoView is not a function. (In 'massageTypeRef.current.scrollIntoView()', 'massageTypeRef.current.scrollIntoView' is undefined)</p>
  <hr />
  <p>i build a snack in expo to show what i want to do, for some reason there is work perfect, and when i do the same thing in my projects it give me message &quot;is not a function....&quot;
  heres the snack <a href="https://snack.expo.io/OYWlNQwP4" rel="nofollow noreferrer">https://snack.expo.io/OYWlNQwP4</a></p>
  <p>here link to my github component and project: <a href="https://github.com/roeigr7/LIOR/blob/main/src/screens/MeetingPickerScreen.js" rel="nofollow noreferrer">https://github.com/roeigr7/LIOR/blob/main/src/screens/MeetingPickerScreen.js</a></p>