Is the state variable redundant in the following React Native code?
export default function Test(props) {
const [number, setNumber] = useState(props.number);
return(
<Text>{number}</Text>
)
}
What is considered best practice, and why?