Best of JavaScript — May 2024
- 1
- 2
- 3
- 4
- 5
- 6
Community Picks·2y
5 Cool Chrome DevTools Features Most Developers Don’t Know About
Discover 5 lesser-known features of Chrome DevTools that can greatly boost development efficiency, including observing variable values in real time, logging to the console without changing code, setting conditional breakpoints, using DOM breakpoints, and preserving console logs across page reloads.
- 7
- 8
freeCodeCamp·2y
How to Use React Developer Tools – Explained With Examples
Learn how to use React Developer Tools to inspect and debug React applications efficiently. Install the extension, navigate the interface, and explore component state and props. Debug errors and analyze performance using React DevTools.
- 9
DEV·2y
Array.reduce() is Goated
Discover the power and versatility of Array.reduce() through nine incredible use cases, including summing numbers, flattening arrays, grouping objects, creating lookup maps, counting occurrences, composing functions, implementing state management, generating unique values, and calculating averages.
- 10
- 11
- 12
DEV·2y
The Module System in Javascript
Mastering the module system in JavaScript is crucial for creating scalable, maintainable, and efficient code. Modules help with code organization, reusability, encapsulation, and dependency management. CommonJS is the first module system in Nodejs, and it uses require() and module.exports to import and export modules. The difference between module.exports and exports is that module.exports replaces the entire exports object, while exports is a shorthand reference to module.exports.
- 13
- 14
- 15
DEV·2y
It’s not just you, Next.js is getting harder to use
Next.js' App Router has two major problems that make it difficult to adopt. The Pages Router was simpler and had file-based routing. The App Router introduced new features but also increased complexity. It's challenging to avoid complexity as frameworks grow. Just because something is recommended, doesn't mean it's right for you.
- 16
Community Picks·2y
New alternatives to innerHTML
New alternatives to innerHTML have been implemented in browsers. The setHTML function is a safe method that does not execute script, while setHTMLUnsafe is an unsafe method that poses a risk of XSS attacks. The Sanitizer API helps put the naming of setHTMLUnsafe in context. The setHTMLUnsafe function is useful for declarative shadow DOM. The getHTML function allows users to retrieve HTML content, with the ability to serialize shadow DOM.
- 17
Awesome Go·2y
A JavaScript developer tries Go for the first time
A JavaScript developer shares their first impressions of the Go programming language, highlighting its error handling, defer statement, explicit type conversion, switch statement, pointers, simple type system, and consistent approach to coding.
- 18
- 19
Community Picks·2y
TypeScript Basics
TypeScript is a typed superset of JavaScript that brings a package of benefits to the table. It catches errors at compile time, improves code readability, provides IntelliSense, offers better tooling, and is better for large applications. Learning JavaScript is a prerequisite for learning TypeScript.
- 20
- 21
- 22
DEV·2y
JavaScript is not the problem
A performance issue in an Angular 11 app was caused by a CSS rule, not JavaScript. The article discusses the use of JavaScript in web development and the importance of optimizing static assets and JavaScript bundles. It also addresses the role of Web Components and the Shadow DOM, concluding that excessive use of JavaScript is the problem, not JavaScript itself.
- 23
- 24
- 25
