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

Reorder Nuxt.js's fetch method in vue/order-in-components #1268

Merged
merged 1 commit into from Aug 8, 2020
Merged

Reorder Nuxt.js's fetch method in vue/order-in-components #1268

merged 1 commit into from Aug 8, 2020

Conversation

FloEdelmann
Copy link
Member

Nuxt.js version 2.12.0 introduced a new fetch syntax (see the related docs page). Since fetch now has access to the Vue component's this context, I propose to move it below data in vue/order-in-components's default order.

This updated order also doesn't conflict with #1107 (comment):

I believe that Nuxt properties should be at least before methods, I don't want to scroll til the end to see what special properties my page has

As this change would probably be a breaking change, I suggest to make this decision before releasing stable v7.0.0.

@ota-meshi
Copy link
Member

I'm not familiar with nuxt APIs so please let me ask.

Why do we need to change the order suggested in the comments below?
#1107 (comment)

@ota-meshi
Copy link
Member

Does that mean that by the time I merged the previous PR, users couldn't use this in fetch, it changed?

@FloEdelmann
Copy link
Member Author

Using this in fetch is possible since v2.12.0, i.e. since 2020-03-17.

The previous PR (where the order of the other Nuxt properties was changed) was merged on 2020-06-09.

However, fetch's position didn't change since #823 (merged 2019-08-17).

@ota-meshi
Copy link
Member

I misunderstood. As you say, the order of fetch was not changed in #1107.
This change is sounds good to me.

@ota-meshi ota-meshi merged commit 37ec77a into vuejs:master Aug 8, 2020
@FloEdelmann FloEdelmann deleted the order-in-components-fetch branch December 29, 2020 18:27
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.

None yet

2 participants