I'm new on React hooks. I was trying to replace an state (class) for a useState hook. Something simple like the code bellow. The problem is in the line const [showPass, setShowPass] = useState[false], which I believe the syntax is correct
import React, { useState } from 'react';
import { View, Text, TextInput, TouchableOpacity } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons'
import { Theme } from '../theme';
const Input = ({ icon, password, number, placeholder, value, onChangeText, colored, style, containerStyle, label }) => {
const [showPass, setShowPass] = useState[false];
return (
<>
</>
);
}