Next.js Discord

Discord Forum

Hide/unmount component

Answered
Pacific herring posted this in #help-forum
Open in Discord
Pacific herringOP
hello. Is it possible to "remove" a component from the page? I'm not talking about hiding with styles tho.

Basically I have some things that are protected with password, and if you type the correct password, the input text will disappear and the user will have access to it.

for example
you go to site/oiqw78d, protected with password. it loads but you're also requested to type a password. once you type the correct one, said request disappear and you can freely access the media. Is it possible? or should i do it in another way
Answered by Spectacled bear
why not bring the components when password is matched? it's more secure too
View full answer

3 Replies

Pacific herringOP
Up
Spectacled bear
why not bring the components when password is matched? it's more secure too
Answer
Pacific herringOP
so tru