I have state like this
const [username,setUsername] = useState("")
const [password,setPassword] = useState("")
const [page,setPage] = useState("")
there is only one text input in entire page in page 1 with prev and next bottom buttons
enter user name
in page 2 with prev and next bottom buttons
enter password
but when I move from page1 to page 2 or vice verse text input field become empty.
I am just hiding textinput according to page value