jake83's avatar

jake83 liked a comment+100 XP

2mos ago

Color theme for those looking to copy:

    --color-background: oklch(0.12 0 0);
    --color-foreground: oklch(0.95 0 0);
    --color-card: oklch(0.16 0 0);
    --color-primary: oklch(0.65 0.15 160);
    --color-primary-foreground: oklch(0.12 0 0);
    --color-border: oklch(0.24 0 0);
    --color-input: oklch(0.24 0 0);
    --color-muted-foreground: oklch(0.6 0 0);
jake83's avatar

jake83 liked a comment+100 XP

3mos ago

@nosthas

jake83's avatar

jake83 wrote a comment+100 XP

3mos ago

At 7:28 I assume you meant to remove a validation rule, however there isn't one currently in the update method. Instead you remove the update on the Idea model. Presumably this is a mistake? Great tutorial so far btw :)

jake83's avatar

jake83 liked a comment+100 XP

3mos ago

There might be some differences in environment, but when I changed ->waitForText('Editing User') to ->waitFor('@modal-content') as shown around 7:30 in the video, my test started failing like this:

FAILED  Tests\Browser\ExampleTest > it can open a modal and close it                                                                                             
Actual URL [http://laracasts-modal.test/users/50/edit] does not equal expected URL [http://laracasts-modal.test/users].  
Failed asserting that 'http://laracasts-modal.test/users/50/edit' matches PCRE pattern "/^http:\/\/laracasts\-modal\.test\/users$/u".
jake83's avatar

jake83 liked a comment+100 XP

4mos ago

I think you are confusing Vue Reactivity with the old options API from Vue 2. You don't need to use Object.assign when you want to assign an object to a reactive object. You said we need to do it to keep errors variable reactive, but it's not true; you don't lose reactivity unless you use Vue 2. Here is a snippet:

import { ref } from 'vue'

const errors = ref({})
const errorsFromServer = { name: 'Name is incorrect' }

errors.value = errorsFromServer
errors.value.name = 'Override error message'

console.log(errors.value.name) // prints 'Override error message'

Great video btw, I'm enjoying this series 👍

jake83's avatar

jake83 liked a comment+100 XP

4mos ago

Does anyone have access to the GitHub repo for this exercise?

jake83's avatar

jake83 wrote a comment+100 XP

4mos ago

@zoilodev late with the reply, but I'm just getting to this tutorial myself. For the benefit of anyone starting this - it looks like this is the intended repo: https://github.com/SabatinoMasala/vue-state-management-backend

jake83's avatar

jake83 liked a comment+100 XP

4mos ago

For working with local storage, I like to use VueUse's useStorage (https://vueuse.org/core/useStorage/), which makes the local storage reactive.

jake83's avatar

jake83 wrote a comment+100 XP

4mos ago

@zoilodev A bit late (sorry!), but for anyone else's benefit I think the intended repo is https://github.com/SabatinoMasala/vue-state-management/tree/composable