Best of JavaScriptNovember 2023

  1. 1
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    What's New in JavaScript in 2023 – Changes with Code Examples

    ECMAScript 2023 introduces changes to JavaScript that make programming easier. The changes include the Object.groupBy method for grouping objects based on a property value, the Array.toSliced(), Array.toSorted(), and Array.toReversed() methods for manipulating arrays without mutating the original array, and the findLast() and findLastIndex() methods for finding the last element or index in an array that satisfies a condition.

  2. 2
    Article
    Avatar of communityCommunity Picks·2y

    Why Signals Are Better Than React Hooks

    Discover the benefits of using signals over React hooks, including simplified usage, improved performance, and eliminating complex rules. Signals handle dependencies automatically and can be used anywhere in or outside of a component. Performance metrics have shown significant speed improvements with the use of signals.

  3. 3
    Article
    Avatar of devtoDEV·2y

    OOP Design Patterns in Javascript

    The Command Pattern turns a request or operation into a standalone object. The Strategy Pattern defines a family of interchangeable algorithms. The Flyweight Pattern reduces memory consumption by sharing common parts of objects. The Observer Pattern establishes a one-to-many dependency between objects.

  4. 4
    Article
    Avatar of asayerasayer·3y

    JSDoc: a solid alternative to TypeScript

    JSDoc is a solid alternative to TypeScript that provides static typing and scalability for JavaScript code without the need for transpilation. It offers flexibility, code annotation, and no compilation step, while still allowing for improved code maintainability and understanding. JSDoc can be used to add types to values, objects, arrays, functions, and classes, as well as improve code documentation with features like code authors, example usage, versioning, and helpful links. JSDoc files can be converted into documentation websites or TypeScript declaration files (.d.ts) for integration with TypeScript projects.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    State of JavaScript 2023

    JavaScript is expanding its reach beyond the browser with features like React Server Components and frameworks like Solid and Qwik. The survey aims to measure awareness and popularity of JavaScript features and libraries.

  6. 6
    Article
    Avatar of asayerasayer·2y

    Build a Mind-Mapping App with React Flow

    Learn how to build a mind-mapping app using React Flow, an open-source toolkit for generating interactive diagrams and visualizations within React applications. This tutorial covers setting up the project, creating components, integrating React Flow, customizing node appearance, adding interactivity, and saving/loading mind maps.

  7. 7
    Article
    Avatar of communityCommunity Picks·3y

    The complete guide to WebSockets with React

    Learn about WebSockets and how to use them with React to build a smooth realtime cursor experience. Discover what WebSockets are, how they work, and explore some React WebSocket libraries. The article also covers best practices for using WebSockets with React and provides a tutorial on building a live cursors experience.

  8. 8
    Article
    Avatar of asayerasayer·2y

    Best Practices for Security in Next.js

    Explore common security vulnerabilities in web applications and learn best practices for securing Next.js applications, including keeping dependencies up-to-date, input validation, authentication and authorization, data encryption, implementing security headers, and using TypeScript for type safety.

  9. 9
    Article
    Avatar of javacodegeeksJava Code Geeks·3y

    Node.js Cheatsheet

    Node.js is an open-source, server-side runtime environment that allows developers to build scalable, high-performance web applications using JavaScript. It has gained popularity due to its versatility, single-language usage, and extensive ecosystem. Node.js has advantages like high performance, non-blocking I/O, cross-platform compatibility, real-time capabilities, and a large community of support. However, it also has limitations like single-threaded nature, limited multithreading, learning curve for asynchronous programming, debugging challenges, and managing complex code structures for asynchronous operations.

  10. 10
    Article
    Avatar of hnHacker News·2y

    HTML First

    HTML First is a set of principles that aims to make building web software easier, faster, more inclusive, and more maintainable by leveraging the default capabilities of modern web browsers, the simplicity of HTML's attribute syntax, and the web's ViewSource affordance.

  11. 11
    Article
    Avatar of devtoDEV·2y

    HTMX: Building Interactive Web Apps Without JavaScript

    HTMX is a lightweight JavaScript library that enables developers to create interactive web experiences without writing JavaScript code. It offers simplicity, performance, maintainability, and SEO benefits. The key features of HTMX include asynchronous HTTP requests, DOM manipulation, client-side routing, and WebSockets support.

  12. 12
    Article
    Avatar of asayerasayer·2y

    All about Cookies and JavaScript

    Learn about cookies and how they enhance website user experience. Discover the types of cookies and their attributes. Find out how to work with cookies in JavaScript.

  13. 13
    Article
    Avatar of tilThis is Learning·2y

    Debug a React app with Visual Studio Code

    Learn how to debug a React app using the Visual Studio Code debugger, including setup, running the debugger, setting breakpoints, inspecting variables, and using the Call Stack panel.

  14. 14
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    JavaScript Game Tutorial – Build a Stick Hero Clone with HTML Canvas + JavaScript

    Learn how to create a Stick Hero clone game using pure JavaScript and HTML canvas. This tutorial covers game initialization, different game phases, drawing platforms, hero, and sticks, the main animation loop, and event handling.

  15. 15
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    How to Use JavaScript Arrow Functions – Explained in Detail

    Learn about the arrow function syntax in JavaScript, how to convert a regular function to an arrow function, and the advantages of using arrow functions.

  16. 16
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    How JavaScript Promises Work – Tutorial for Beginners

    Learn how the Promise object works in JavaScript and when to use Promises instead of callbacks. Explore the Fetch API and the Promise methods like Promise.all(), Promise.allSettled(), Promise.any(), and Promise.race().

  17. 17
    Article
    Avatar of devtoDEV·2y

    💻 Web Development Resources #175

    The article provides various web development resources including guides on self-hosting web apps on Ubuntu, frontend testing tools, customizable SVG-based backgrounds, a JavaScript database called SignalDB, free icons, a minimal framework for static websites, discussions on minimalist affordances and card-based UI design best practices, and a CSS framework called NeoBrutalismCSS. It also mentions a CSS button generator.

  18. 18
    Article
    Avatar of medium_jsMedium·2y

    React Folder/File Structure Patterns and Tips: Part 2

    This article provides tips and best practices for organizing folder and file structures in React projects. It suggests creating a 'shared' folder for common components, using an 'index.js' file for every component and page, importing files to one file and exporting from it, getting rid of relative path hell, and keeping components length short.

  19. 19
    Article
    Avatar of freecodecampfreeCodeCamp·2y

    How to Use TypeScript with React

    Learn how to use TypeScript with React. Install TypeScript on your machine and create a Vite project using React and TypeScript. Write React components with TypeScript and define prop types using interfaces or types. Make API calls and store the data in state. Display the data on the UI and handle loading and change events. Explore advanced topics like handling nested properties and separating type declarations into separate files.

  20. 20
    Article
    Avatar of bitBits and Pieces·3y

    Stop using “npm install” in your CI/CD pipeline

    This article compares npm install and npm ci commands, explains the options --legacy-peer-deps and --force, and provides a solution to common issues faced by developers. It also emphasizes the importance of using npm ci in CI/CD pipelines for stable builds.

  21. 21
    Article
    Avatar of bitBits and Pieces·2y

    3 Surprising Async/Await Pitfalls Every Web Developer Must Avoid!

    This article explores three common pitfalls that web developers may encounter when using async/await in JavaScript. It discusses the issue of callback hell and provides a solution using async/await. It also highlights the problem of synchronous function chaining and suggests an alternative approach. Lastly, it addresses performance issues that can arise when using synchronous loops and offers a solution utilizing the async map function.

  22. 22
    Article
    Avatar of angularAngular·2y

    Introducing Angular v17

    Angular v17 introduces new features including deferrable views and built-in control flow. The framework has a fresh new look and a new home for documentation at angular.dev. The built-in control flow feature offers better syntax, type checking, and performance improvements. Deferrable views enable lazy loading with a simple declarative code. The future plans for deferrable views include server-side rendering and partial hydration on the client. SSR and hydration are now enabled by default in new Angular apps. The Angular CLI has improved support for deployment to cloud platforms like Firebase.

  23. 23
    Article
    Avatar of bitBits and Pieces·2y

    Using TypeScript Decorators in Practise

    TypeScript decorators provide a powerful mechanism for enhancing and modifying the behavior of classes and their components. They offer extensive decoration capabilities, legacy support for parameter decoration, and robust type checking. There are five main categories of decorators: class decorators, method decorators, property decorators, accessor decorators, and auto-accessor decorators. Method decorators can be used to log method calls.

  24. 24
    Article
    Avatar of freecodecampfreeCodeCamp·3y

    How to Call an API in JavaScript – with Examples

    Learn how to call an API in JavaScript and integrate external data into your web applications. Explore concepts such as choosing an API, using the Fetch API for GET requests, and handling responses and errors. Gain practical knowledge with real-world examples of fetching weather data and posting form data to a server.

  25. 25
    Article
    Avatar of tkdodoTkDodo·3y

    Why You Want React Query

    Discover why React Query is essential for managing asynchronous state in React applications. It simplifies data fetching, addresses race conditions, provides loading and error states, and offers various features to enhance developer productivity.