cyon / vuex-pagination

Use paginated resources in your Vue/Vuex app with ease
107 stars 19 forks source link

Improve terminology #2

Open MaxGfeller opened 5 years ago

MaxGfeller commented 5 years ago

It has been pointed out to me that the terminology of certain features of this library is not optimal, especially when you learned about typical MVP patterns somewhere.

Things like instance and controller mean different things there.

My proposal would be the following:

Here's an example of how the resource would look like:

import { createResource, resource } from 'vuex-pagination'

let resource = createResource('books', fetchBooksPage)
// returns the same as this:
let resource = resource('books')

Let me know what you think!

jonleesmith commented 5 years ago

In my use I have mapped it to the name resource also so I definitely agree

MaxGfeller commented 5 years ago

@jonleesmith Thanks for the feedback! What do you think about the instance/pager?

MaxGfeller commented 5 years ago

controller has been renamed to resource in 1.3.0 but controller will continue to work while we're on the v1.x. In a next minor version, the use of controller will throw a deprecated warning.