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!
23.
Using Shared CSS
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
}
}
2 Comments
Hey ! Am I right if I'm saying : "SidebarCollapsed is just a state for the product page layout" ?
I feel like all the logic is about the product layout and not only the sidebar. So the SidebarCollapsed can be something like ProductLayoutCollapsed, and we can have another state with the SidebarExpanded for example, and a third state if we wish. With the naming SideBarCollapsed I feel like we are storing SideBar logic inside the product component and that break all the good vibes about splitting code into components. =D I mean, this is SideBar behavior inside the Product layout, but the button also change property on the content area. And maybe this button is going to be outside the sidebar ...
Just to be clear : I'm not saying the naming is bad. I'm just wondering if we can do even cleaner / sweeter code for the next developer going through this code. Don't want to be rude. Just a feeling that I want to share and discuss it =)
Hey Nathan!
That's an interesting point of view. Extracting the UI Layout logic into its own code is actually a valid architectural decision. There isn't a single way of organizing an application, it all depends on your needs and the complexity of it!
The architectural decisions made in this tutorial have to do with the natural way of evolving in complexity and we follow simple rules such as: "dumb versus smart components" and "what is the deepest component that needs some data".
In fat, in general, in real world applications, the UI logic belong to components (not Vuex, for example) and they are kept as simple as possible, which is what we are doing here. :)
"Houston: no signs of life"
Start the conversation!