I\'m really new to React Native and I\'m wondering how can I hide/show a component.
Here\'s my test case:
The following example is coding in typescript with Hooks.
import React, { useState, useEffect } from "react";
........
const App = () => {
const [showScrollView, setShowScrollView] = useState(false);
......
const onPress = () => {
// toggle true or false
setShowScrollView(!showScrollView);
}
......
{showScrollView ? ( ) : null}
......
}