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

feat: prevent endless reloading #44

Merged
merged 4 commits into from
Sep 21, 2019
Merged

Conversation

pimlie
Copy link
Contributor

@pimlie pimlie commented Sep 21, 2019

When somehow the nuxt app can not be shown, the loading screen would keep endlessly reloading.

I think that in almost any case when this issue happens the user has hit a webpack issue. This feature is in no means a fix for anything, it just prevents possible developer confusion as its difficult to understand why the reloading occurs as probably almost nobody knows that the nuxt loading screen does this reloading.

@pimlie pimlie requested review from pi0 and atinux September 21, 2019 13:16
app/app.vue Outdated Show resolved Hide resolved
app/app.vue Outdated Show resolved Hide resolved
app/app.vue Outdated
<div v-else-if="preventReload" class="reload_prevented">
<h3 class="hasErrors">Failed to show Nuxt.js app after {{ maxReloadCount }} reloads</h3>
<p>
Your Nuxt.js app could not be shown after {{ maxReloadCount }} reloads
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is somehow repeated and not useful for user

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have shortened the line in the paragraph, some repetition seems to be unavoidable? Or do you have a better suggestion?

@@ -0,0 +1,25 @@
const baseKey = '__nuxt_loading_screen_'

export default {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vue/Nuxt plugin idea: A mixin to automatically sync component state :D

@pi0 pi0 merged commit 260dd61 into master Sep 21, 2019
@pi0 pi0 deleted the feat-prevent-endless-reloading branch September 21, 2019 14:22
@pi0 pi0 mentioned this pull request Oct 1, 2019
This was referenced Oct 14, 2019
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

Successfully merging this pull request may close these issues.

2 participants