0.0.6 • Published 2 months ago

@vuemodel/orion v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

core

Core repository for contracts and implementations of VueModel

WIP

VueModel aims to abstract the "play" between vue and the backend.

To start, it will be solely focused on using the composition API and aim to have implementations for:

I'll likely focus on support for GraphQl when those three are implemented.

A little more...

The idea, is that you'll be able to easily "sync" your frontend and backend data with code like this:

<script setup>
const { form, create, creating, error } = useModel(Todo)
</script>

<template>
<input v-model="form.title">

<button :disabled="creating" @click="create">create</button>

<span v-if="creating">creating...</span>
<span v-if="error">{{ error.message }}</span>
</template>

Yes, related data too!

const { include, fetch, fetching, errors, collection: todos } = useModelCollection(TodoList)

include.value = [
  'author',
  'todos.comments'
]

async function fetchTodos () {
  await fetch()
  console.log(errors)
  console.log(todos.value)
}

Note the consle.log(todos.value). This library will also manage state (using Vuex ORM... but state will also adhere to contracts that we'll be able to swap out!)

Code like the above always works the same way, and the final abstraction can be unified among backends! And that's the goal of this library: Frontend/Backend Unification

Stay tuned!

0.0.6

2 months ago

0.0.5

4 months ago

0.0.3

4 months ago

0.0.4

4 months ago

0.0.2

4 months ago

0.0.1

4 months ago