score:1

Accepted answer

what you should do is pass the state when calling navigation retrieve that state in the userlist.

usercreate

navigate("/userlist", { state: { showflag: true } });

userlist

const { state } = uselocation();
const { showflag } = state; // use showflag the way you want.

you can understand more how it works with this answer

score:0

you could define this state in contextapi and share it everywhere you need - you can read about it here


Related Query

More Query from same tag