dev.to

How to Remove Unused CSS

Reduce your CSS files more than 60% during your development workflow with Purgecss. I have been searching for a while a tool that will allow me to clean my CSS from unused style. Why was I looking for this kind of tool? Because nowadays almost every developer uses a lot of CSS frameworks and libraries to develop interfaces faster and easier so it is inevitable that the size of css files increase a lot. But how much of the CSS style that you import from external libraries you really use? Sometimes even less than 20%, so why do you need to...

dev.to

Creating an Authentication Navigation Guard in Vue

So, you've built a login page and authentication! You route everyone there before they can go anywhere else on your site. But what happens if they just type another path in the url? If they're unauthenticated, can they still get in? 😳 Oops. That's not very secure at all. What we really want, is to make sure they're always sent to the login page, no matter where they try to go, as long as their unauthenticated. A great way to do this in Vue, is to use a navigation guard. Whenever a user on your site attempts to route to a page, you know...

dev.to

Tips to write better Conditionals in JavaScript

What are Conditionals? In any programming language, the code needs to make decisions and execute actions depending on the condition given in the input. For example, in a game, if the player's number of lives is 0, then it's game over. In a weather app, if it is being looked at in the morning, show a sunrise graphic; show stars and a moon if it is nighttime. In this article, we'll explore how so-called conditional statements work in JavaScript. If you work with JavaScript, you would be writing a lot of code with many conditionals...

dev.to

Demystifying Modern Frontend Jargon

The world of frontend programming is full of confusing jargons and we see a lot these terms getting thrown around. This is my small attempt to break down some of these terms or concepts into simpler terms with very limited to no code examples. 1. Pure function A function is called pure when its return value is determined only by its own arguments. When given the same argument, the result will always be the same. function twice(num) { return num * 2; } If we pass 4 to the this function, it will always return 8. Key...

dev.to

9 (Other) Projects you can do to Become a Front-End Master in 2020

I love this post by Simon Holdorf. He's got some ideas for you to level up your skills as a front-end developer next year. Here they are: Build a movie search app using React Build a chat app with Vue Build a weather app with Angular Build a to-do app with Svelte ... and 5 more like that. All good ideas. All extremely JavaScript framework focused. I like the idea of thinking of being a front-end developer as being someone who is a browser person. You deal with people who use some kind of client to use the web on some kind of device....

dev.to

Speed up your website in 1 minute with Instant.page

Behind this clickbait title lies a really nifty little tool. I stumbled upon this while browsing Hacker News a while back. Actually it's been active on this website since february now but I never took to time talk about it. Instant.page is a tiny Javascript library which is using just-in-time preloading – it preloads an anchor right before a user clicks on a hyperlink. The technique used if fairly simple: Instant.page calculates the time a user spends hovering a link (which is an obvious behavior when you want to click on something) and...

dev.to

The Principles for Writing Awesome Angular Components

Introduction This article was originally published on Bits and Pieces by Giancarlo Buomprisco Angular is a component-based framework, and as such, writing good Angular components is crucial to the overall architecture of an application. The first wave of front-end frameworks bringing custom elements came with a lot of confusing and misinterpreted patterns. As we have now been writing components for almost a decade, the lessons learned during this time can help us avoid common mistakes and write better code for the building blocks...

dev.to

I learned 3 things using CSS Grid + Flexbox for a standard site.

I really enjoyed my little project of translating a Graphic Design Grid into a Web page using CSS Grid, but the idea of building a standard website with CSS Grid was still tripping me up. So I went ahead and built something basic and standard with CSS Grid. My original grid's template row height was set in pixels and adjusting heights for responsiveness is even too crazy for me, so I set my template rows as such: grid-template-rows: repeat(12, minmax(0px, max-content)); Now I have a grid that is responsive ready. The above style sets...

dev.to

CSS Quickies: the quotes property and the q HTML tag

What is CSS Quickes? I started to ask my beloved community on Instagram: "what CSS properties are confusing for you?" In "CSS Quickies" I will explain one CSS property in depth. These are community requested properties. If you also confused about a CSS property, then write to me on Instagram or Twitter or down below in the comments! I answer all the questions. Lets talk about quotes in CSS Did you know that you can set costume quotes with CSS? Your first question maybe but why do I need custom quotes in the first...

dev.to

What's your favorite Angular Blog/Article?

Sup fam! I want to make a collection of some of the best blogs articles out there you have read about Angular 2+. Let's make this post to be a centralized place where you can find the top of the top Angular articles, blogs, tutorials you have read. Leave a comment! SHARE THE KNOWLEDGE! 1) Angular routing in Enterprise 2) Beware! Angular can steal your time 3) RxJS recipes: ‘forkJoin’ with the progress of completion for bulk network requests in Angular 4) NgRx — Cherry Picking the Meta 5) Here is what you need to know about dynamic...

dev.to

The perfect responsive menu

On a desktop, websites have the space to show the full menu, but on a mobile device that space isn't there, and you want to hide the menu behind a toggle (like a hamburger icon) and show it when people click that toggle. How do you offer both in an accessible way that keeps your HTML simple, without duplicating your menu? That's what the perfect responsive menu does. Though the hamburger icon is well known by now, to better help people that are not familiar with it you can show the icon alongside the word "Menu". In this article, we'll show...

dev.to

What I Learned My First Week at My First Dev Job

One day I'm filling out job applications, doing Leetcode until my head is doing somersaults, and then the next day I'm in. To think that just about a year ago I wrote about my fears of even attempting to look for a developer job, and now I'm looking back at my first week as a professional software engineer. It's still hard to believe, even though the reality of my day-to-day is so familiar and tangible. This post is for anyone still on the outside looking in. I'm one of the most guilty of imposter syndrome, and worry everyday if I'm capable...