frontend

Ternary Operator in JS: Everything you need to know

Ternary Operator in JS: Everything you need to know

What is Ternary? Ternary Operator is a javascript operator which is available across browsers since July 2015. It is a shorthand alternative for if/else statements. This operator is widely-used in different programming languages like Java, C, Python but our focus in this article will be on javascript. Let's check out the general syntax of ternary operator. condition ? ifTrue : ifFalse Enter fullscreen mode Exit fullscreen mode As you can see from the example above, ternary operator replaces if and else statements, accordingly, with ? and : symbols. The condition which is on the left-hand side of the question mark…
Read More
Top 5 Game-Changing JavaScript Features in ECMAScript 2024: Boost Your Code Like Never Before!

Top 5 Game-Changing JavaScript Features in ECMAScript 2024: Boost Your Code Like Never Before!

1. Top-Level await – Async Simplified! Gone are the days when async code required wrapping everything in functions. With top-level await, we can directly use await in modules without needing an async function wrapper. This feature is particularly handy for simplifying code and reducing boilerplate Before top-level await, fetching data required an async function: async function fetchData() { const response = await fetch('https://api.example.com/data'); const data = await response.json(); return data; } fetchData(); Enter fullscreen mode Exit fullscreen mode Now, with top-level await, we can call await at the root level: const response = await fetch('https://api.example.com/data'); const data = await response.json();…
Read More
Next.js v15 — Reflecting on Mistakes

Next.js v15 — Reflecting on Mistakes

Hello! This is another article about next.js. And finally, about the new version! Each release is a set of new, interesting, and controversial features. This version will be no exception. However, new version is interesting not so much for its new functionality, but for the change in priorities and organization in next.js. And yes, as you may have guessed from the title, a significant part of this release is valuable for reflecting on previous mistakes. I've been working with next.js since around version 8. All this time I've been watching its development with interest (sometimes not without disappointment). Recently, I've…
Read More
Top 8 JavaScript Debugging Tools for Front-End Development

Top 8 JavaScript Debugging Tools for Front-End Development

What is JavaScript Debugging? JavaScript debugging is the process of identifying and resolving errors in JS code. It allows developers to step through code line-by-line, monitor variables, and control flow to find bugs and issues. Common JS Debugging Tools Here are some widely used debugging tools for JavaScript: Browser DevTools: Built into browsers to debug JavaScript code. You can set breakpoints, step through code, inspect values, and much more. Node Inspector: A debugger interface for Node.js code that integrates with Chrome DevTools. Visual Studio Code: Provides excellent built-in support for JS debugging. WebStorm: A JetBrains IDE with comprehensive debugging features…
Read More
Designing Multi-Tenant UI with Tailwind CSS

Designing Multi-Tenant UI with Tailwind CSS

Tailwind CSS is one of the most popular and widely used CSS libraries. It leverages utility classes to build responsive designs without having to write extensive CSS. It does not use pre-styled components like Bootstrap or Material UI. In this article, we are going to focus on how to build custom variants for a multi-tenant frontend application. This article is for those with a basic understanding of CSS and Tailwind CSS. You don't need to be a frontend expert to follow along. Concept of Variants in Tailwind CSS Tailwind CSS variants are sets of predefined classes that allow developers to…
Read More
Axios vs Fetch

Axios vs Fetch

Versão em português Axios e Fetch são ferramentas populares para fazer requisições HTTP em JavaScript, mas possuem algumas diferenças chave. Aqui está um resumo: Axios Recursos Embutidos: O Axios vem com muitos recursos embutidos, como transformação automática de JSON, interceptores de requisição e resposta, e cancelamento de requisições. Compatibilidade com Navegadores: Suporta navegadores mais antigos, incluindo o Internet Explorer. Tratamento de Erros: O Axios rejeita automaticamente promessas para status de erro HTTP (como 404 ou 500), facilitando o tratamento de erros. Interceptores de Requisição/Resposta: Permite modificar requisições ou respostas globalmente de forma simples. Cancelamento de Requisições: O Axios oferece uma…
Read More
React Concurrent Mode: Optimizing React Performance

React Concurrent Mode: Optimizing React Performance

React Concurrent Mode is an advanced feature of React designed to make applications more interactive and responsive by improving the way React handles rendering. Instead of rendering updates synchronously (all at once), Concurrent Mode allows React to work on multiple tasks at different priorities and interrupt rendering when necessary. This means React can ensure that the most important parts of the user interface (UI) remain responsive, even when there are large or complex updates happening in the background. Key Features of React Concurrent Mode: Interruptible Rendering: In traditional React rendering (known as synchronous rendering), React completes one task before starting…
Read More
How to learn HTML: 46 great sites, courses and books (all free)

How to learn HTML: 46 great sites, courses and books (all free)

How can you learn HTML today? For free? It may be hard to get really good material for free but there are great resources to get you started: To get started HTML for Beginners - introduction from freeCodeCamp. HTML (and CSS) from scratch - video course also from freeCodeCamp. HTML for Beginners - quick guide from HTML.com. The Ultimate Guide to HTML for Beginners - from Hubspot. Learn HTML - course from Codecademy. Teaches the basics. Learn HTML - course from Google. More fundamentals, by Google developer experts. HTML course - from Study Tonight. Free HTML courses at Udemy. Learn…
Read More
Why is impossible to have a clean architecture inside a frontend project

Why is impossible to have a clean architecture inside a frontend project

The internet is full of videos, courses and articles teaching you to have something like "domain" folders in your frontend project, to create "entities" and everything that would make Uncle Bob fall apart. This little post shows why it's impossible to have a clean architecture in this kind of project. Clean Architecture Clean Architecture is a set of good practices to build a good architecture. It is based on the following principles: Independent of Frameworks Testable Independent of UI Independent of Database Independent of any external agency This post will not gonna dive into them. You can check the original…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.