Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clunky behaviour on reloading pages with SSR nuxt #809

Open
sinkaroid opened this issue May 13, 2023 · 1 comment
Open

Clunky behaviour on reloading pages with SSR nuxt #809

sinkaroid opened this issue May 13, 2023 · 1 comment

Comments

@sinkaroid
Copy link

Dev mode:

Working as intended

Prod mode:

After closing with button, I want to reload pages, the things is <modal> value (raw html) still appear on the pages even it's not clicked/emitted, weird

Version:

vue-js-modal@2.0.1

Example & screenshots:

No, i just have no idea why the <modal> value is pre-appear when reloading pages otherwise working as expected

@benjamin-richardson-circular
Copy link

benjamin-richardson-circular commented Jun 13, 2023

It may depend where you are setting up the value that will trigger the modal. In prod mode, the data on the server is shared across requests. If you are setting something to true on your first load, then doing a refresh where it should not be true....unless you specifically set this to false then Nuxt may still have the value from the previous invocation.

You should test this out by logging the values that trigger the modal while running a prod build version of Nuxt locally using the build and start commands.

I find this happens when something was not originally intended for Nuxt and gets ported over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants