Code Monkey home page Code Monkey logo

real-world-vue's Introduction

Vue Mastery Example Event App

Following along?

We encourage you to follow the course on Vue Mastery, and code along with us. This course has tags representing the start and finish of each lesson, just in case you get stuck.

Here are the commands youโ€™ll want handy once you have it installed. Iโ€™m assuming you already have npm installed.

To install dependencies:

    $ npm install

To run the server:

    $ npm run serve

To get json-server, which we use for our mock database (Starting on API calls with Axios)

    $ npm install -g json-server

To run the mock database

    $ json-server --watch db.json

Real World Vue Course

Lesson
Vue CLI n/a Finished Code
Optimizing your IDE Starting Code Finished Code
Vue Router Basics Starting Code Finished Code
Dynamic Routes & History Mode Starting Code Finished Code
Single File Components Starting Code Finished Code
Global Components Starting Code Finished Code
Slots Starting Code Finished Code
API Calls with Axios Starting Code Finished Code

Mastering Vuex Course

Lesson
Vuex State & Getters Starting Code Finished Code
Vuex Mutations & Actions Part 1 Starting Code Finished Code
Vuex Mutations & Actions Part 2 Starting Code Finished Code
Vuex Modules Starting Code Finished Code
Success & Error Notifications Starting Code Finished Code

Next-Level Vue Course

Lesson
Progress Bar: Axios Interceptors Starting Code Finished Code
Progress Bar: In-Component Route Guards Starting Code Finished Code
Progress Bar: Global and Per-Route Guards Starting Code Finished Code
Completing our Progress Bar Starting Code Finished Code
Reusable Form Components: BaseInput Starting Code Finished Code
Reusable Form Components: BaseSelect Starting Code Finished Code
Reusable Form Components: BaseButton Starting Code Finished Code
Form Validation with Vuelidate Starting Code Finished Code
Form Validation with Vuelidate pt 2 Starting Code Finished Code
Mixins Starting Code Finished Code
Filters Starting Code Finished Code

real-world-vue's People

Contributors

atomjar avatar gregg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

real-world-vue's Issues

missed adding categories in store.js in video prior to 05:14

minor error which students should be able to diagnose by this stage of the course, caused me some delay and annoying, hence the request to fix.

@ 05:00 in the vuex-state-getters lesson.
https://www.vuemastery.com/courses/mastering-vuex/vuex-state-getters

adding this code to EventCreate.vue

  • {{ cat }}
  • and
    computed: mapState({
    user: 'user',
    categories: 'categories'
    })

    during the video, omitted adding categories in store.js
    state: {
    user: { id: 'abc123', name: 'adam Jahr' },
    categories: [
    'sustainability',
    'nature',
    'animal welfare',
    'housing',
    'education',
    'food',
    'community'
    ]
    },

    without categories in store.js the following error appears.

    There was an error:
    [actually more messages appear if you expand the feedback in developers console, but the error is not easy to recognize or diagnose, a broader problem I haven't worked on in this stack]


    other unrelated issues/questions while I'm here. :)
    Refreshing the app is not as simple as refreshing the page.
    Not sure if hot reloading is the solution > https://vue-loader.vuejs.org/guide/hot-reload.html
    Would really like to see a video explaining how to debug apps properly.

    Mastering Vuex, Success & Error Notifications Lesson 7. error.response should be error.message

    at 0:36 in the Success & Error Notifications lecture the code incorrectly references error.response when error.message should be used.

    console.log('there was an error:', error.response)

    https://www.vuemastery.com/courses/mastering-vuex/success-error-notifications

    It's a relatively minor error, quite annoying until you realize how simple it is to fix.

    This is fixed later in the video when
    console.log('there was an error:', error.response)
    is replaced by
    console.log('there was an error:', error.message)

    Add vuelidate to package.json

    The src/main.js file uses a package called vuelidate, which is not in package.json
    It needs to be fixed so that those watching the course can download, run npm install and stream with it and not start troubleshooting

    v-on="$listeners" conflinct with @change="updateValue"

    In release vuelidateP2-finish in the BaseSelect.vue v-on="$listeners" causes the same conflict that is caused in the BaseInput.vue component. However, the source code implement the solution only for the BaseInput.vue component.

    Solution

    Use v-on="listeners" instead of v-on="$listeners" and add

    computed: {
          listeners() {
            return {
              ...this.$listeners,
              input: this.updateValue
            }
          }
        }
    

    to your BaseSelect.vue component

    Template execution failed: ReferenceError: BASE_URL is not defined

    Hi
    your project work fine, but I am trying to integrate in a personal project, the only thing that doesn't work, is when I set

    In index.html I immediately had this error:

    Template execution failed: ReferenceError: BASE_URL is not defined

    To run my application I use :
    npm run dev

    I have already installed lodash dependecy, but the problems seems to not be in the dependencies.
    What can I do?
    Thank you

    First time install + serve

    audited 856 packages in 2.821s

    84 packages are looking for funding
    run npm fund for details

    found 0 vulnerabilities

    PS C:\Users\32479\Desktop\RWV\real-world-vue-master> npm run serve

    [email protected] serve C:\Users\32479\Desktop\RWV\real-world-vue-master
    vue-cli-service serve

    ERROR TypeError: Cannot read property 'version' of undefined
    TypeError: Cannot read property 'version' of undefined
    at module.exports (C:\Users\32479\Desktop\RWV\real-world-vue-master\node_modules@vue\cli-plugin-eslint\index.js:21:27)
    at C:\Users\32479\Desktop\RWV\real-world-vue-master\node_modules@vue\cli-service\lib\Service.js:82:9
    at Array.forEach ()
    at loadedCallback (C:\Users\32479\Desktop\RWV\real-world-vue-master\node_modules@vue\cli-service\lib\Service.js:80:20)
    at Service.init (C:\Users\32479\Desktop\RWV\real-world-vue-master\node_modules@vue\cli-service\lib\Service.js:97:14)
    at Service.run (C:\Users\32479\Desktop\RWV\real-world-vue-master\node_modules@vue\cli-service\lib\Service.js:247:16)
    at Object. (C:\Users\32479\Desktop\RWV\real-world-vue-master\node_modules@vue\cli-service\bin\vue-cli-service.js:37:9) at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] serve: vue-cli-service serve
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] serve script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\32479\AppData\Roaming\npm-cache_logs\2022-04-22T17_02_17_534Z-debug.log

    Code breaks after an npm upgrade. Cannot create a new event with final version of the code

    Code breaks after an npm upgrade. Cannot create a new event with final version of the code

    Run a:

    npm upgrade
    

    then run the code with the json-server.

    The code breaks when we try to create a new event from the UI.

    Here is the Error from the DevTools

    Invalid prop: type check failed for prop "value". Expected String, Number, got Event 
    
    found in
    
    ---> <BaseSelect> at src/components/BaseSelect.vue
           <EventCreate> at src/views/EventCreate.vue
             <App> at src/App.vue
               <Root>
    

    License?

    First, thanks for building this project! Really enjoying the https://vuemastery.com content. ๐Ÿ˜„

    Second, right now this code is technically "All Rights Reserved" and not licensed. ChooseALicense.com (by GitHub) has more info on what can (and mostly can't) be done with code that has no license: https://choosealicense.com/no-permission/

    Would y'all be open to adding a license to this code, so folks taking the tutorials can build up from what they use here?

    Thanks!
    ๐ŸŽฉ

    Mastering Vuex - Lesson 11 - event-create route in wrong order

    The start tag's code for Lesson 11 has the event-create and event-show routes out of order. The "finish" tag's code has it fixed and course notes in the Mastering Vuex Orientation shows it setup right but I don't believe it's ever mentioned in the video that it needs to be reordered.

    This:

    export default new Router({
      mode: 'history',
      routes: [
        {
          path: '/',
          name: 'event-list',
          component: EventList
        },
        {
          path: '/event/:id',
          name: 'event-show',
          component: EventShow,
          props: true
        },
        {
          path: '/event/create',
          name: 'event-create',
          component: EventCreate
        }
      ]
    })

    Should be:

    export default new Router({
      mode: 'history',
      routes: [
        {
          path: '/',
          name: 'event-list',
          component: EventList
        },
        {
          path: '/event/create',
          name: 'event-create',
          component: EventCreate
        },
        {
          path: '/event/:id',
          name: 'event-show',
          component: EventShow,
          props: true
        }
      ]
    })

    for some reason EventCard components are not being shown in EventList page/component while using axios.

    I followed the lessons carefully. But When I made the API call using axios from a dummy database (db.json) I don't see the events on the EventList page. I did not use any style as mention in the lessons. Also created a very small API just for testing purpose.

    db.json:
    { "events":[ { "id": 1, "title": "StreetVibez" }, { "id": 2, "title": "BuildItUp" }, { "id": 3, "title": "RandomCircle" } ] }
    EventsList.vue:

    `

    Events Listing

    <script> import EventCard from '@/components/EventCard.vue' import EventService from '@/services/EventService.js' // first we export this component to DOM !! // now we write some code which will help us to register EventCard component // as a child component of Event List export default { components: { EventCard }, //let's use the api data inside our component..so we create a reactive property //called events data() { return { events: [] } }, created() { EventService.getEvents() .then(response => { this.events = response.data }) .catch(error => { console.log('There was an error:', error.response) }) } } </script>

    EventCard.vue:


    {{ event.title }}




    <script> export default { props: { event: Object // important **object vs 0bject ** } } </script> <style scoped> h4 { color:green; } </style>`

    Screenshot 2019-09-11 13 07 03

    App breaks when applying reusable BaseSelect component (lesson 8 in "Real World Vue"-course)

    I keep getting the following error after selecting an option (category or time) in one of the drop-down lists in the example app's "Create event" form:
    "Invalid prop: type check failed for prop "value". Expected String, Number, got Event ".

    This error occurred after I followed the tutorial on creating reusable form components (on https://www.vuemastery.com/courses/next-level-vue/Reusable-Form-Components-BaseSelect) .
    I see nothing wrong in the source code. I even downloaded the course's own source code and replaced my own, but the error prevails.

    Is this a known issue?

    Plans to update the source code?

    Hello,

    It seems, when you create a vue app today with vue-cli 3, it doesn't create a src\router.js, but instead src\router\index.js.
    There might be other changes in the source structure. It'd be great if you update your source code, so we can save our time.

    Thanks.

    Failed to compile with 3 errors

    Hi, I've just cloned the repo, then I did npm install and I had to fix 2 issues with npm audit fix as suggested by npm, now when I run npm run serve I got this:

    These dependencies were not found:
    
    * vuelidate in ./src/main.js
    * vuelidate/lib/validators in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/views/EventCreate.vue?vue&type=script&lang=js&
    
    To install them, you can run: npm install --save vuelidate vuelidate/lib/validators
    
    
    This relative module was not found:
    
    * ./filters/date in ./src/main.js
    

    I tried npm install --save vuelidate vuelidate/lib/validators as suggested but nothing help.
    I'm running npm v6.4.1, any idea?

    Missing Events from Lesson body.

    I the State & Getters lesson of the Mastering VUEX series, it would have been nice if the events object was listed in the body of the lesson. I had to download the finished example to grab a copy of it.
    Thanks and Cheers!

    Serve error

    Missing dependencies during serve,

    These dependencies were not found:                                                                                                                                                              * vuelidate in ./src/main.js                                                                    * vuelidate/lib/validators in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/
    babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib
    ??vue-loader-options!./src/views/EventCreate.vue?vue&type=script&lang=js&                                                                                                                       To install them, you can run: npm install --save vuelidate vuelidate/lib/validators
    

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google โค๏ธ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.