Chapters
48 Chapters
|
5:05:52
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!
Subscribe to download the code!
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Subtitles
Subscribe to download the subtitles!
Subscribe to download the subtitles!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
32.
Page Context "Service"
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
This course is also built to work with Vue 3!
What JavaScript libraries does this tutorial use?
// package.json
{
"devDependencies": {
"@symfony/webpack-encore": "^0.30.0", // 0.30.2
"axios": "^0.19.2", // 0.19.2
"bootstrap": "^4.4.1", // 4.5.0
"core-js": "^3.0.0", // 3.6.5
"eslint": "^6.7.2", // 6.8.0
"eslint-config-airbnb-base": "^14.0.0", // 14.1.0
"eslint-plugin-import": "^2.19.1", // 2.20.2
"eslint-plugin-vue": "^6.0.1", // 6.2.2
"regenerator-runtime": "^0.13.2", // 0.13.5
"sass": "^1.29.0", // 1.29.0
"sass-loader": "^8.0.0", // 8.0.2
"vue": "^2.6.11", // 2.6.11
"vue-loader": "^15.9.1", // 15.9.2
"vue-template-compiler": "^2.6.11", // 2.6.11
"webpack-notifier": "^1.6.0" // 1.8.0
}
}
6 Comments
in the challenge to this video in the answer to pick (B) the function is defined as
which is a syntax error in JS since the
asynckeyword has to be beforefunction:Hey Acran,
You're totally right! Also, another problem with redeclaring the value of
randomTurtleFactconstant. I fixed the code block, thanks for reporting it!Cheers!
Hello here ! There is something that I am not sure I fully understood.
We have in <b>products.vue</b>:
<b>'current-category-id'</b> which will be passed as props to <b>sidebar.vue</b>
In <b>sidebar.vue</b> :
'<b>currentCategoryId</b>' != '<b>current-category-id</b>'. How is it that it works anyway? If we had passed, from <b>products.vue</b>, '<b>currentCategoryId</b>' instead of '<b>current-category-id'</b>, the result would be the same?
Thanks !
Hi, Kiuega!
It's part of the magic in Vue! :D
Your property is called `currentCategoryId` but if you type `current-category-id` in your Vue template, Vue will automatically translate it for you so that you can refer to it in JavaScript!
Hi there,
When I refresh the main page, it looks a bit weird. I can temporarily see a page with no styles and it is annoying: could we avoid it?
Hey @AbelardoLG!
Excellent question! You're only seeing this because of this change: https://symfonycasts.com/sc...
We have "disabled CSS extraction" in dev mode only. This causes there to be NO real link tags on the page. Instead, the CSS is injected via your JavaScript. We do this in dev only (this will not happen on production builds) and we only do it so that HMR (hot module replacement) with the dev-server can work: it requires that you disable CSS extraction. So, it's not a problem on production.
Btw, with Encore 1.0 (and Webpack 5), I believe that you do NOT need to disableCssExtraction anymore to get HMR working with CSS. So if you upgrade, I think you can remove that line and still enjoy HMR.
Cheers!
"Houston: no signs of life"
Start the conversation!