Latest Tutorials

Learn about the latest technologies from fellow newline community members!

  • React
  • Angular
  • Vue
  • Svelte
  • NextJS
  • Redux
  • Apollo
  • Storybook
  • D3
  • Testing Library
  • JavaScript
  • TypeScript
  • Node.js
  • Deno
  • Rust
  • Python
  • GraphQL
  • React
  • Angular
  • Vue
  • Svelte
  • NextJS
  • Redux
  • Apollo
  • Storybook
  • D3
  • Testing Library
  • JavaScript
  • TypeScript
  • Node.js
  • Deno
  • Rust
  • Python
  • GraphQL

    Integrating LangChain with FastAPI for Asynchronous Streaming

    LangChain and FastAPI working in tandem provide a strong setup for the asynchronous streaming endpoints that LLM-integrated applications need. Modern chat applications live or die by how effectively they handle live data streams and how quickly they can respond. LangChain is a library that simplifies the incorporation of language models into applications. It provides an abstracted layer over various components such as large language models (LLMs), data retrievers, and vector storage solutions. This abstraction allows developers to integrate and switch between different backend providers or technologies seamlessly. FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.7+ based on standard Python type hints. It is designed for creating RESTful APIs quickly and efficiently, with automatic interactive API documentation provided by Swagger and ReDoc.

      useEffect in React: Best Practices and Common Pitfalls

      In React development, the useEffect hook is a fundamental tool that allows you to manage side effects in function components. Side effects in React include operations like fetching data, subscribing to external data sources, manually modifying the DOM, and even handling timers. However, while useEffect is a powerful and flexible tool, its misuse can lead to inefficient code and hard-to-debug issues. In this post, we'll explore the best practices for using useEffect in React and highlight some of the common pitfalls that developers often encounter when working with it. Whether you're new to React or a seasoned developer, understanding how to effectively utilize useEffect will improve the performance and maintainability of your applications. In React, the useEffect hook is used to perform side effects in function components. A side effect refers to any action that reaches outside the component to interact with something that React is not directly controlling. This can include tasks like:

      I got a job offer, thanks in a big part to your teaching. They sent a test as part of the interview process, and this was a huge help to implement my own Node server.

      This has been a really good investment!

      Advance your career with newline Pro.

      Only $40 per month for unlimited access to over 60+ books, guides and courses!

      Learn More

        Race Conditions in React: What They Are and How to Avoid Them

        If work with asynchronous code in JavaScript, especially in React, you’ve likely cursed once or twice because of race conditions . In this post, we’ll explore what race conditions are, what causes them in React, and the strategies you can adopt to stop them in their tracks. In programming, a race condition occurs when multiple asynchronous processes (such as network requests or state updates) attempt to access shared data or resources at the same time. If these processes are not properly synchronized, the outcome can be unpredictable, as the final result depends on the order in which the processes complete.

        Building Accessible Web Applications: A Short Guide to WAI-ARIA Standards

        Web Accessibility Initiative – Accessible Rich Internet Applications (WAI-ARIA) standards introduce additional attributes that can be incorporated into HTML elements to significantly enhance web application accessibility. This short introductory guide will dive into the fundamental principles of WAI-ARIA, and shed light on how they can be efficiently employed in your web applications. We'll be discussing ARIA roles , states and properties , landmarks , live regions , labels , and complex widgets . The article will also feature code examples and visual illustrations to aid in understanding how WAI-ARIA can be instrumental in improving the accessibility of your web applications. ARIA roles serve as defining markers for the type of element and its function within the application. They prove useful in overriding the default role of an element or in attributing roles to elements that don't inherently have a default role.

        The Crucial Role of Color Contrast in User Experience

        In this article, I will explore the important aspect of web accessibility, with a specific focus on the importance of color contrast in web design. I will share insights on how to integrate accessibility principles in web development projects, emphasizing the implementation of the right color contrast to enhance user experience. Web accessibility refers to the practice of designing websites that are usable by the broadest range of users. This includes individuals with visual, auditory, cognitive, or physical disabilities, and elders who may face challenges accessing websites due to declining vision or hearing abilities. By making websites more accessible, we can help individuals stay connected with their loved ones and remain engaged with the world around them. Before I explore the importance of color contrast in web accessibility, let's take a look at some valuable resources that can enlighten you about the principles of web accessibility:
        Thumbnail Image of Tutorial The Crucial Role of Color Contrast in User Experience