Pop up div in a server component?
Answered
Dutch Smoushond posted this in #help-forum
Dutch SmoushondOP
Anyone got a way to have an onClick pop up in a server component? Is there another way that works too?
Answered by B33fb0n3
It is not possible to have an onClick Event inside a server component. You can define a modal and wrap your server components in it. This modal will be opened when the url matches the specific string and will also be closed when navigating back. Like that you can have a clientcomponent (button with modal) inside your server component and the button with the modal holds the states @Dutch Smoushond
4 Replies
It is not possible to have an onClick Event inside a server component. You can define a modal and wrap your server components in it. This modal will be opened when the url matches the specific string and will also be closed when navigating back. Like that you can have a clientcomponent (button with modal) inside your server component and the button with the modal holds the states @Dutch Smoushond
Answer
Dutch SmoushondOP
Thank you!
@Dutch Smoushond Thank you!
please mark solution