Full-Stack Vue.js 2 and Laravel 5 : Migrating Vuebnb

Posted 6 days ago by wallacebmann

I've been working my way through the Full-Stack Vue.js 2 and Laravel 5 course and have hit a few snags. I'm a newbie, so any time the course isn't typo-perfect, I get tripped up. So, I've been using this forum to record my learnings.

This post is relevant to chapter 5, section "Migrating Vuebnb", where you are updating resources/assets/js/data.js to remove the var statement and replace it with export default. The book shows the following:

export default { ... }

and the file before the replacement is

var sample = { ... }

The correct form of the new file is to replace "var sample" with "export default". What I did first was to wrap the entirety of the old form with the new, and that is bad. Probably completely obvious to a front end developer, but I'm flying blind.

In other words ... this is bad:

export default { var sample = { ... } }

This is good:

export default { ... (the same stuff that used to be inside the var sample) }

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.