I have an error with my code
export default function SignIn({ navigation }) {
const [destination, setDestiantion] = useState("");
return (
<View>
<TextInput
onChangeText={value => {
typedText(value);
setDestiantion(value === "Employee" ? "SignUp1" : "SignUp2");
}}
value={text}
/>
<TouchableOpacity onPress={() => navigation.navigate({ destination })} />
</View>
);
}
But my simulator said:
while calling navigate with an object as the argument you need to specify name or key.
Someone help me please, thank you very much.