by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 22:22
    visualfanatic edited #9403
  • Jan 31 2019 22:04
    visualfanatic opened #9403
  • Jan 31 2019 18:25

    yyx990803 on regression-test

    fix: allow more enumerated valu… chore: update sponsors [ci skip… fix: fix v-bind:style for camel… and 1 more (compare)

  • Jan 31 2019 17:29
    yyx990803 closed #9402
  • Jan 31 2019 17:20
    devedse opened #9402
  • Jan 31 2019 16:49
    Justineo closed #9401
  • Jan 31 2019 16:40
    Giwayume opened #9401
  • Jan 31 2019 15:24
    yyx990803 closed #9396
  • Jan 31 2019 15:24

    yyx990803 on dev

    fix: fix child forceUpdate regr… (compare)

  • Jan 31 2019 15:08
    yyx990803 closed #9382
  • Jan 31 2019 15:08

    yyx990803 on dev

    fix: fix v-bind:style for camel… (compare)

  • Jan 31 2019 15:08
    yyx990803 closed #9386
  • Jan 31 2019 15:04

    yyx990803 on dev

    chore: update sponsors [ci skip… (compare)

  • Jan 31 2019 15:04

    yyx990803 on patreon-update-1548947041032

    (compare)

  • Jan 31 2019 15:04
    yyx990803 closed #9400
  • Jan 31 2019 15:04

    vue-bot on patreon-update-1548947041032

    chore: update sponsors [ci skip] (compare)

  • Jan 31 2019 15:04
    vue-bot opened #9400
  • Jan 31 2019 14:59

    yyx990803 on patreon-update-1548924868622

    (compare)

  • Jan 31 2019 14:58
    yyx990803 closed #9393
  • Jan 31 2019 14:56

    yyx990803 on dev

    fix: allow more enumerated valu… (compare)

palistha prajapati
@palistha01_gitlab
Please help me
@andre_prog_gitlab
@nkoehring
cyberco
@cyberco

I'm trying to get started with Vuex in Vue 3 but bump into:

import {defineComponent} from 'vue'
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
...

Resulting in:

 Property 'use' does not exist on type 'typeof import("/Users/x/app/node_modules/vue/dist/vue")'
Salathiel Genèse
@SalathielGenese

Hi,

I'm new to Vue, Vuex and Vue Router (which I learned over the weekend).
This is my ToDo app I've been tracking my understanding with - https://repl.it/join/ouyljrbq-salathiel_genes

My Issue: I cannot have multiple named [nested] routes working like examples in documentation.

Norman
@nkoehring
that link needs a login
Salathiel Genèse
@SalathielGenese
Darn
In my view, I have
            <router-link :to="{ name: 'todo.create' }">
              Create
            </router-link>
            <!-- [...] -->
          <td>
            <router-link :to="{ name: 'todo.edit', params: { id: todo.id } }">
              Edit
            </router-link>
And here are my routes
image.png
I highlighted the errors I am getting in the console
Salathiel Genèse
@SalathielGenese
But it is more than a console thing - navigating there lands nowhere.
Norman
@nkoehring
did you try to simply use paths instead of names and see if that works?
Salathiel Genèse
@SalathielGenese
Yes, it was working with path actually...
So I thought, let me try named route b/c, well, it's cool :sunglasses:
The first named routed worked when it was the only one
I added the second and both started failing
cool & less error-prone
Norman
@nkoehring
hmm, maybe the dot is a problem? I have to admit, I'm just guessing wildly here because I never had the need for nested routes
Salathiel Genèse
@SalathielGenese
I thought the same and tried capital-, kebab- and snake- cases without much success
Norman
@nkoehring
interesting... it is hard to be helpful here unfortunately. But I guess nested routes and names are not well working together ... OR there's some specific way of using them.
Salathiel Genèse
@SalathielGenese
Yup, just didn't find it in the docs
Norman
@nkoehring
but do you actually have a nested router-view as well?
your TodoListComponent should have a <router-view/> I guess
Salathiel Genèse
@SalathielGenese
Sure
The create works great when I use plain links
Norman
@nkoehring
Sorry, I guess without some interactive example (speak: on codesandbox for example) I don't know how to help
Salathiel Genèse
@SalathielGenese
No problem, if I find rooms during the day, I will go StackBlitz with it and update you
Salathiel Genèse
@SalathielGenese

Hello,

Please, how to import Vue using ES6 import statement ?

image.png
^^^ Runtime Error
import Vue, {createApp} from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);
import('./app.vue').then(App =>
    createApp(App).mount(':root > body > main')
).catch(console.error);
src/main.js
^^^ My newly generated Vue3 app
I am trying to Vue.use( Vuex ) before importing the root component which script initialize the store
image.png
^^^ And I get this warning in the console :(
Norman
@nkoehring
it is because you're using Vue3. There is no use on Vue anymore.
tl;dr: use is now part of the application API, that means:
import { createApp } from 'Vue'
const app = createApp(/* ... */)
app.use(/*...*/)
Salathiel Genèse
@SalathielGenese
WoW
Thank you very much, @nkoehring
Salathiel Genèse
@SalathielGenese
Okay, so what is less obvious is how I should bind my router and store instances to Vue 3 app instance
John S.
@outofgamut
is there a good reason to use both apollo-composable and VueX?
Salathiel Genèse
@SalathielGenese

OKAY

So my new setup uses Vue 3...

import {router} from "@/app.router";
import {store} from "@/app.store";
import {createApp} from 'vue';
import App from './app.vue';

(async (app = createApp(App)) => {
    app.use(store);
    app.use(router);
    await router.isReady();
    app.mount(':root > body > main');
})().catch(error => {
    console.error( error );
    global?.process?.exit(-1);
});
It appears that Vue 3 must be coupled to Vuex 4 and Vue Router 4
It now works as expected
@nkoehring :point_up: September 14, 2020 1:02 PM
Salathiel Genèse
@SalathielGenese
Next question...

I am having "Invalid navigation guard" with this guard -


  beforeRouteEnter(to, from, next) {
    const {['todo:id']: getTodoById} = store.getters;
    const {id} = to.params;

    if (!id) {
      return next();
    }

    getTodoById(id)
        .then(todo => next(vm => vm.todo = todo))
        .catch(error => {
          console.error(error);
          next(false);
        })
  },

I have no clue at what I am doing wrong.

Please, need your pair of eyes and insights.

WhiteO
@doctrine4_gitlab
Hello all, i have problem with vue-cli-electron-builder - https://gist.github.com/WhiteO/da18d56c0a59d195af4be1e3d29192df help
palistha prajapati
@palistha01_gitlab
hello
I'm getting this error and don't know the reason. Please help me.
image.png