TLDR Web Dev

TLDR WEB DEV 2024-10-24

6 sections19 entrieslinks blockcomplete parse

Parse notes

  • Subscription/account footer truncated before parsefooter_truncated

01GENERAL

02ARTICLES & TUTORIALS

THE TRUE NATURE OF USEACTIONSTATE

The useActionState hook in React 19 helps manage return values from server functions and makes the user experience for asynchronous operations. This article introduces a simple TODO app built with useReducer and shows how to refactor it to utilize useActionState for persistence, adding optimistic UI updates and error handling. Integrating useActionState with useOptimistic makes the user experience much better and smoother.

nikhilsnayak.dev16 min read

YOU SHOULD PROBABLY PAY ATTENTION TO TOKENIZERS

Tokenizers break down text into smaller units. Their ability to handle different types of data, such as emojis, misspelled words, and dates, can affect the accuracy of RAG models. Poor tokenization can lead to incorrect embeddings and flawed results from LLMs. Data should be carefully preprocessed and standardized for better LLM retrieval reliability.

cybernetist.com15 min read

03OPINIONS & ADVICE

WHY I'M LEAVING OPENAI AND WHAT I'M DOING NEXT

Miles Brundage, former Senior Advisor for AGI Readiness at OpenAI, is leaving the company to focus on AI policy research and advocacy from a more independent position. He believes that while OpenAI is making progress towards AI safety, both the organization and the world at large are not yet ready for the potential of artificial general intelligence (AGI).

milesbrundage.substack.com27 min read

A LOVE LETTER TO GOLANG

Go is a valuable programming language for building web applications thanks to its streamlined syntax, robust standard library, and concurrency features. Go frameworks like Templ make full-stack development much easier.

mortenvistisen.com9 min read

OOP IS NOT THAT BAD, ACTUALLY

Mainstream statically-typed OOP enables straightforward and backwards-compatible evolution of types, making them easy to compose. This post shows a simple example involving a logging library and a database library to demonstrate how OOP allows for adding new functionality and dependencies without breaking existing code.

osa1.net13 min read

04LAUNCHES & TOOLS

TOOLPAD

Toolpad is a suite of React components and a low-code builder designed for rapidly developing dashboards and internal tools. It consists of Toolpad Core, a set of React components, and Toolpad Studio, a self-hosted low-code admin builder.

github.comGitHub repository

OPENAI-REALTIME-API

Openai-realtime-api is a TypeScript client for OpenAI's real-time voice API that provides a fully typed and bug-fixed alternative to the official JavaScript version. It has 100% compatibility with OpenAI's events, supports various runtimes like Node.js, browser, and Deno, and includes Node.js CLI examples for testing.

github.comGitHub repository

REACT NATIVE BOTTOM TABS

React Native Bottom Tabs uses native platform components to implement bottom navigation in React Native apps.

github.comGitHub repository

05MISCELLANEOUS

HOW MICROSOFT EDGE IS REPLACING REACT WITH WEB COMPONENTS

Microsoft's Edge browser team is transitioning from React to native web components with the WebUI 2.0 project to improve performance, especially on low-end devices. The team aims to convert about 50% of existing React-based UIs to web components by year-end, focusing on a "markup-first architecture.”

thenewstack.io9 min read

ASYNC RUST IN THREE PARTS

Async/await in Rust is a way to achieve concurrency without using threads. Threads, while efficient for small numbers of tasks, become inefficient and resource-intensive when dealing with thousands of tasks. Async/await, using futures and tasks, is a more scalable and efficient way to manage concurrency, especially for tasks that involve I/O operations.

jacko.io7 min read