# fetch

Published articles for fetch.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## The Autonomous Dumbledore

DevFeed: [The Autonomous Dumbledore](<https://devfeed.tech/articles/the-autonomous-dumbledore-27368.md>)

Original publisher: [Read original article](<http://engineering.khanacademy.org/posts/autonomous-dumbledore.htm>)

Author: Khan Academy

Published: 2016-04-25T22:00:00Z

Content type: article

Language: en

Sources: [Khan Academy](<https://devfeed.tech/sources/khan-academy.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [Job](<https://devfeed.tech/topics/job.md>), [test](<https://devfeed.tech/topics/test.md>), [maintenance](<https://devfeed.tech/topics/maintenance.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [feature](<https://devfeed.tech/tags/feature.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [job](<https://devfeed.tech/tags/job.md>), [maintenance](<https://devfeed.tech/tags/maintenance.md>), [news](<https://devfeed.tech/tags/news.md>), [running](<https://devfeed.tech/tags/running.md>), [scheduled](<https://devfeed.tech/tags/scheduled.md>), [test](<https://devfeed.tech/tags/test.md>), [tests](<https://devfeed.tech/tags/tests.md>), [web-frontend](<https://devfeed.tech/tags/web-frontend.md>)

### AI overview

An intern at Khan Academy describes the Autonomous Dumbledore, a system that monitors PSAT score-linking endpoints through recurring tests and automatically enables or disables the related feature based on recent results.

### Source excerpt

By Evy Kassirer When I arrived at Khan Academy to start my internship on the Official SAT Practice ... Read more

## CodeSOD: The Big Family

DevFeed: [CodeSOD: The Big Family](<https://devfeed.tech/articles/codesod-the-big-family-28514.md>)

Original publisher: [Read original article](<https://thedailywtf.com/articles/the-big-family>)

Author: Remy Porter

Published: 2026-08-27T06:30:00Z

Content type: opinion

Language: en

Sources: [The Daily WTF](<https://devfeed.tech/sources/the-daily-wtf.md>)

Topics: [PHP](<https://devfeed.tech/topics/php.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [data](<https://devfeed.tech/topics/data.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Localization (l10n)](<https://devfeed.tech/topics/localization.md>), [formatting](<https://devfeed.tech/topics/formatting.md>), [HTML](<https://devfeed.tech/topics/html.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [code](<https://devfeed.tech/tags/code.md>), [codesod](<https://devfeed.tech/tags/codesod.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [html](<https://devfeed.tech/tags/html.md>), [humor](<https://devfeed.tech/tags/humor.md>), [php](<https://devfeed.tech/tags/php.md>), [programming](<https://devfeed.tech/tags/programming.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

This commentary examines a large, generalized PHP code sample that builds hierarchical output from a presumed database source. It highlights probable SQL injection risk, unused array keys, dynamic localization fields, extensive number formatting and HTML string manipulation, string-based date-time parsing, and repeated code for child and sibling records.

### Source excerpt

Some time ago, Charles shared with us some awful PHP, aka the most common sort. Today's code sample is maybe a little too big to sum up, but I'll let Charles take a crack at it. It's so bad that even analyzing and laughing at it feels impossible. But it's so bad, I couldn't not share it. I'm the only one handling all the IT-related tasks at my company, and I don't have anyone here to vent or laugh about this kind of thing with. So, I figured, why not share it here? I'm hoping it'll provide at least a little bit of catharsis or some dark humor. To make sure the confidentiality of the codebase was respected, I took the liberty of generalizing it. You might notice some inconsistencies, but that's just me trying to keep things neutral while protecting the original structure and functionality. Apologies if it looks a bit patchy - the goal was to avoid revealing any specific details or sensitive code. The whole block is north of 400 lines, and it's doing a lot. Or well, maybe it's not, as you'll see. Let's star with the outermost layer. $resm_data = $data_source->fetchData("group=" . $item_id); foreach ($resm_data as $key => $value) { // rest of the code here } We fetch data from a data source, presumably a database, passing our condition as a string, which reeks of probable SQL injection, but I don't know what library they're using. I also note they're using the key/value style of array iteration, but never actually check the key. $option_id = $value->option_id; $resm_details = $detail_source->fetch($option_id); if ($resm_details) { $label = $resm_details->{"label$lang"}; $description = $resm_details->{"description$lang"}; $category = $resm_details->category; Nice little bit of "meta" programming to get their localization working, it'll fetch labelen or labelde as needed. Definitely not a horrible, dangerous way to solve that problem. We use that again to get our currency figured out. That lets us do number formatting. So much number formatting code. if ($category == 0)

## Server-Side Tools Are Now Available for DigitalOcean Inference Engine

DevFeed: [Server-Side Tools Are Now Available for DigitalOcean Inference Engine](<https://devfeed.tech/articles/server-side-tools-are-now-available-for-digitalocean-inference-engine-19942.md>)

Original publisher: [Read original article](<https://www.digitalocean.com/blog/server-side-tools-public-preview>)

Author: Grace Morgan

Published: 2026-06-17T16:33:00Z

Content type: release

Language: en

Sources: [DigitalOcean](<https://devfeed.tech/sources/digitalocean.md>)

Topics: [Digital Ocean](<https://devfeed.tech/topics/digital-ocean.md>), [Inference](<https://devfeed.tech/topics/inference.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Model Context Protocol](<https://devfeed.tech/topics/model-context-protocol.md>), [Web](<https://devfeed.tech/topics/web.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [real-time](<https://devfeed.tech/topics/real-time.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agentic](<https://devfeed.tech/tags/agentic.md>), [digitalocean](<https://devfeed.tech/tags/digitalocean.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [inference](<https://devfeed.tech/tags/inference.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [preview](<https://devfeed.tech/tags/preview.md>), [product-updates](<https://devfeed.tech/tags/product-updates.md>), [search](<https://devfeed.tech/tags/search.md>), [web](<https://devfeed.tech/tags/web.md>)

### AI overview

DigitalOcean announces that Server-Side Tools are available in Public Preview for its Inference Engine. The tools let models use web search, web fetch, DigitalOcean Knowledge Bases, MCP servers, and supported Anthropic and OpenAI tools within inference requests.

### Source excerpt

AI applications and agents are only as capable as the tools, data, and systems they can access. With Server-Side Tools, now in Public Preview for DigitalOcean Inference Engine, a model can call out to search the web, read your data, call your systems, and take action all from inside a single inference request. You can enable the new tools with your existing DigitalOcean Model Access Key. No separate tool infrastructure to assemble, no new credentials, no orchestration layer to operate. Server-Side Tools bring web search, web fetch, DigitalOcean Knowledge Bases, MCP servers, and supported Anthropic and OpenAI tools into your inference requests, each covered below. Bring Real-Time Information Into Your AI Applications When applications need current information such as news, documentation, or live data, models can access the web directly during inference. Web Search: Get live answers from the web Web Search enables retrieval of up-to-date information from the web. This enables research workflows, support experiences, and agentic applications that need to reason over recent events, changing information, or content that is not available in a model's training data. Web Fetch: Pull in content from URLs and documents Web Fetch pulls in content from specific URLs or PDFs during inference. It is useful for summarizing pages, extracting structured data from documents, or pulling in reference material on demand. Both Web Search and Web Fetch are powered by Exa. Pricing is usage-based; see the pricing page for current rates. Web Mode: Enable web access through the model URL Some agent frameworks only allow you to configure a model name and do not expose tool configuration. For these cases, DigitalOcean supports Web Mode, which automatically enables Web Search and Web Fetch through the model field. This gives the model access to Web Search and Web Fetch without explicitly defining tools, making it easier to integrate with agent frameworks that only allow model-level configuration

## Don't Let Flakes Pin You Down: Unlocking Better Inputs

DevFeed: [Don't Let Flakes Pin You Down: Unlocking Better Inputs](<https://devfeed.tech/articles/don-t-let-flakes-pin-you-down-unlocking-better-inputs-32432.md>)

Original publisher: [Read original article](<https://nixcademy.com/posts/dont-let-flakes-pin-you-down-unlocking-better-inputs-with-nixtamal/>)

Author: toastal

Published: 2026-03-26T00:00:00Z

Content type: tutorial

Language: en

Sources: [Nixcademy Blog](<https://devfeed.tech/sources/nixcademy-blog.md>)

Topics: [Nix](<https://devfeed.tech/topics/nix.md>), [version-control](<https://devfeed.tech/topics/version-control.md>), [Git](<https://devfeed.tech/topics/git.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>)

Tags: [best-practices](<https://devfeed.tech/tags/best-practices.md>), [features](<https://devfeed.tech/tags/features.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [reproducibility](<https://devfeed.tech/tags/reproducibility.md>), [version-control](<https://devfeed.tech/tags/version-control.md>)

### AI overview

This article examines the limitations of Nix flakes' input-pinning model and introduces nixtamal as a way to work with better inputs. It explains how pinning supports reproducibility, contrasts flakes with earlier tooling such as niv and npins, and discusses limitations including restricted version-control support.

### Source excerpt

Flakes gave us input pinning, but you might be missing out on better inputs. Let's see how nixtamal unlocks them.

## How to emulate LEFT JOIN FETCH using Record-based projections

DevFeed: [How to emulate LEFT JOIN FETCH using Record-based projections](<https://devfeed.tech/articles/how-to-emulate-left-join-fetch-using-record-based-projections-21983.md>)

Original publisher: [Read original article](<https://vladmihalcea.com/emulate-left-join-fetch-using-projections/>)

Author: vladmihalcea

Published: 2026-02-27T08:52:13Z

Content type: tutorial

Language: en

Sources: [Vlad Mihalcea](<https://devfeed.tech/sources/vlad-mihalcea.md>)

Topics: [Persistence](<https://devfeed.tech/topics/persistence.md>), [Java](<https://devfeed.tech/topics/java.md>), [Jakarta EE](<https://devfeed.tech/topics/jakarta-ee.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jakarta-ee](<https://devfeed.tech/tags/jakarta-ee.md>), [java](<https://devfeed.tech/tags/java.md>), [join-fetch](<https://devfeed.tech/tags/join-fetch.md>), [jpa](<https://devfeed.tech/tags/jpa.md>), [unrelated](<https://devfeed.tech/tags/unrelated.md>)

### AI overview

This tutorial explains how to emulate a LEFT JOIN FETCH between two root entities without fetching an intermediate child entity. It uses record-based projections and a JPQL query, and describes how the resulting entities remain managed in the persistence context and can produce updates during flush.

### Source excerpt

Introduction In this article, I'm going to show you how to emulate a LEFT JOIN FETCH between two root entities without fetching the intermediate child entity. I got the inspiration for this article by this comment thread on my blog. Domain Model Let's assume we have the following entities: The Post is the root entity of our hierarchy, but just like it's the case with the relational model, the root entity does not have any reference to its children: On the second level of our hierarchy we have the PostDetails: The PostDetails... Read More The post How to emulate LEFT JOIN FETCH using Record-based projections appeared first on Vlad Mihalcea.

## Introducing iceberg-js: A JavaScript Client for Apache Iceberg

DevFeed: [Introducing iceberg-js: A JavaScript Client for Apache Iceberg](<https://devfeed.tech/articles/introducing-iceberg-js-a-javascript-client-for-apache-iceberg-406.md>)

Original publisher: [Read original article](<https://supabase.com/blog/introducing-iceberg-js>)

Author: Katerina Skroumpelou

Published: 2025-12-08T07:00:00Z

Content type: article

Language: en

Sources: [Supabase Blog](<https://devfeed.tech/sources/supabase-blog.md>)

Topics: [Apache Iceberg](<https://devfeed.tech/topics/apache-iceberg.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [REST API](<https://devfeed.tech/topics/rest-api.md>), [TypeScript](<https://devfeed.tech/topics/typescript.md>), [API](<https://devfeed.tech/topics/api.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [apache-iceberg](<https://devfeed.tech/tags/apache-iceberg.md>), [api](<https://devfeed.tech/tags/api.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [parquet](<https://devfeed.tech/tags/parquet.md>), [rest](<https://devfeed.tech/tags/rest.md>), [typescript](<https://devfeed.tech/tags/typescript.md>)

### AI overview

Supabase introduces iceberg-js, a minimal, vendor-agnostic JavaScript client for the Apache Iceberg REST Catalog API. It gives JavaScript and TypeScript developers a type-safe way to manage Iceberg namespaces and tables across catalog implementations.

### Source excerpt

A minimal, vendor-agnostic JavaScript client for the Apache Iceberg REST Catalog API, providing type-safe catalog management for JavaScript and TypeScript developers.

## Debugging an HTTP streaming issue affecting browser and node-fetch requests behind Cloudflare

DevFeed: [Debugging an HTTP streaming issue affecting browser and node-fetch requests behind Cloudflare](<https://devfeed.tech/articles/debugging-a-mysterious-http-streaming-issue-30999.md>)

Original publisher: [Read original article](<https://www.mintlify.com/blog/debugging-a-mysterious-http-streaming-issue-when-cloudflare-compression-breaks-everything>)

Author: Nick Khami

Published: 2025-08-01T00:00:00Z

Content type: article

Language: en

Sources: [Mintlify Blog](<https://devfeed.tech/sources/mintlify-blog.md>)

Topics: [Streaming](<https://devfeed.tech/topics/streaming.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Cloudflare](<https://devfeed.tech/topics/cloudflare.md>), [fetch](<https://devfeed.tech/topics/fetch.md>)

Tags: [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [curl](<https://devfeed.tech/tags/curl.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [failed](<https://devfeed.tech/tags/failed.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [http](<https://devfeed.tech/tags/http.md>), [postman](<https://devfeed.tech/tags/postman.md>), [streaming](<https://devfeed.tech/tags/streaming.md>)

### AI overview

This article describes an HTTP response streaming failure at Mintlify: cURL and Postman worked, while node-fetch and browser fetch failed. The investigation identified Cloudflare's automatic compression settings as the cause, and disabling compression resolved the issue.

### Source excerpt

We recently encountered a frustrating issue with HTTP response streaming at Mintlify. Our system uses the AI SDK with the Node stream API to forward streams, and suddenly things stopped working properly. The symptoms were confusing: streaming worked perfectly with cURL and Postman, but failed completely with node-fetch and browser fetch. 

## Introducing the Turso Serverless JavaScript Driver

DevFeed: [Introducing the Turso Serverless JavaScript Driver](<https://devfeed.tech/articles/introducing-the-turso-serverless-javascript-driver-5991.md>)

Original publisher: [Read original article](<https://turso.tech/blog/introducing-turso-serverless-javascript-driver>)

Author: Pekka Enberg

Published: 2025-07-31T00:00:00Z

Content type: release

Language: en

Sources: [Turso Blog](<https://devfeed.tech/sources/turso-blog.md>)

Topics: [Turso](<https://devfeed.tech/topics/turso.md>), [Serverless](<https://devfeed.tech/topics/serverless.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Cloudflare Workers](<https://devfeed.tech/topics/cloudflare-workers.md>), [Cloudflare](<https://devfeed.tech/topics/cloudflare.md>), [Vercel](<https://devfeed.tech/topics/vercel.md>), [libSQL](<https://devfeed.tech/topics/libsql.md>), [Deno](<https://devfeed.tech/topics/deno.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Highlight.js](<https://devfeed.tech/topics/highlightjs.md>), [Discord](<https://devfeed.tech/topics/discord.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [cloudflare-workers](<https://devfeed.tech/tags/cloudflare-workers.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [edge-compute](<https://devfeed.tech/tags/edge-compute.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [libsql](<https://devfeed.tech/tags/libsql.md>), [performance](<https://devfeed.tech/tags/performance.md>), [serverless](<https://devfeed.tech/tags/serverless.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [switching](<https://devfeed.tech/tags/switching.md>), [turso](<https://devfeed.tech/tags/turso.md>), [vercel](<https://devfeed.tech/tags/vercel.md>)

### AI overview

Turso introduces an experimental, fetch-only Serverless JavaScript Driver for connecting to Turso databases from serverless and edge environments that do not support TCP connections, including Cloudflare Workers, Vercel Edge Functions, and Deno Deploy. It provides a shared API with the LibSQL client so applications can switch between local embedded databases and remote edge deployments with minimal code changes.

### Source excerpt

Connect to Turso from serverless and edge environments with our new fetch-only JavaScript driver, designed for Cloudflare Workers, Vercel Edge Functions, and more.

## LangChain: Streaming Structured Output in JavaScript

DevFeed: [LangChain: Streaming Structured Output in JavaScript](<https://devfeed.tech/articles/langchain-streaming-structured-output-in-javascript-18943.md>)

Original publisher: [Read original article](<https://www.robinwieruch.de/langchain-javascript-stream-structured/>)

Author: Robin Wieruch

Published: 2025-02-10T06:53:46Z

Content type: tutorial

Language: en

Sources: [Robin Wieruch](<https://devfeed.tech/sources/robin-wieruch.md>)

Topics: [LangChain](<https://devfeed.tech/topics/langchain.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>), [Next.js](<https://devfeed.tech/topics/next-js.md>), [API](<https://devfeed.tech/topics/api.md>), [React](<https://devfeed.tech/topics/react.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Front end](<https://devfeed.tech/topics/frontend.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [backend](<https://devfeed.tech/tags/backend.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [github](<https://devfeed.tech/tags/github.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [langchain](<https://devfeed.tech/tags/langchain.md>), [langchain-javascript-stream-structured-output](<https://devfeed.tech/tags/langchain-javascript-stream-structured-output.md>), [next-js](<https://devfeed.tech/tags/next-js.md>), [react](<https://devfeed.tech/tags/react.md>), [server-sent-events](<https://devfeed.tech/tags/server-sent-events.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [structured-output](<https://devfeed.tech/tags/structured-output.md>)

### AI overview

This tutorial demonstrates how to stream structured output in JavaScript with LangChain, using Next.js and React for the frontend and backend. It explains using Server-Sent Events and the native fetch API with @microsoft/fetch-event-source while building a chatbot application that uses the OpenAI API.

### Source excerpt

How to: Streaming Structured Output in JavaScript with LangChain. A step by step example on how to stream structured data in JavaScript with LangChain ...

## React Data Fetching Patterns

DevFeed: [React Data Fetching Patterns](<https://devfeed.tech/articles/react-data-fetching-patterns-18957.md>)

Original publisher: [Read original article](<https://www.robinwieruch.de/react-data-fetching-patterns/>)

Author: Robin Wieruch

Published: 2024-12-02T05:50:46Z

Content type: tutorial

Language: en

Sources: [Robin Wieruch](<https://devfeed.tech/sources/robin-wieruch.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [client](<https://devfeed.tech/topics/client.md>), [Server](<https://devfeed.tech/topics/server.md>), [User Experience](<https://devfeed.tech/topics/user-experience.md>), [GraphQL](<https://devfeed.tech/topics/graphql.md>)

Tags: [fetch](<https://devfeed.tech/tags/fetch.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [react](<https://devfeed.tech/tags/react.md>), [react-data-fetching-patterns](<https://devfeed.tech/tags/react-data-fetching-patterns.md>), [user-experience](<https://devfeed.tech/tags/user-experience.md>)

### AI overview

A collection of common data-fetching patterns for React components across client and server environments. It explains sequential fetching, distinguishes accidental from intentional waterfalls, and discusses refactoring suitable cases into parallel requests or combining requests through an API.

### Source excerpt

Data fetching patterns for React components across Client and Server Components ...

## Feature-based React Architecture

DevFeed: [Feature-based React Architecture](<https://devfeed.tech/articles/feature-based-react-architecture-18959.md>)

Original publisher: [Read original article](<https://www.robinwieruch.de/react-feature-architecture/>)

Author: Robin Wieruch

Published: 2024-11-25T05:50:46Z

Content type: tutorial

Language: en

Sources: [Robin Wieruch](<https://devfeed.tech/sources/robin-wieruch.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [ui](<https://devfeed.tech/topics/ui.md>), [data](<https://devfeed.tech/topics/data.md>), [Framework](<https://devfeed.tech/topics/framework.md>)

Tags: [components](<https://devfeed.tech/tags/components.md>), [data](<https://devfeed.tech/tags/data.md>), [decoupling](<https://devfeed.tech/tags/decoupling.md>), [domain](<https://devfeed.tech/tags/domain.md>), [feature-based-react-architecture](<https://devfeed.tech/tags/feature-based-react-architecture.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [react](<https://devfeed.tech/tags/react.md>)

### AI overview

This tutorial explains how to organize large React applications with a feature-based architecture. It discusses decoupling features, focusing components and data-fetching functions on their domains, and separating related UI and database operations.

### Source excerpt

How to create a feature-based React architecture that allows large scale applications ...

## How to fetch data with React Hooks

DevFeed: [How to fetch data with React Hooks](<https://devfeed.tech/articles/how-to-fetch-data-with-react-hooks-18964.md>)

Original publisher: [Read original article](<https://www.robinwieruch.de/react-hooks-fetch-data/>)

Author: Robin Wieruch

Published: 2024-10-21T11:50:46Z

Content type: tutorial

Language: en

Sources: [Robin Wieruch](<https://devfeed.tech/sources/robin-wieruch.md>)

Topics: [React](<https://devfeed.tech/topics/react.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [data](<https://devfeed.tech/topics/data.md>), [client](<https://devfeed.tech/topics/client.md>), [axios](<https://devfeed.tech/topics/axios.md>), [API](<https://devfeed.tech/topics/api.md>), [Promise](<https://devfeed.tech/topics/promise.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [async](<https://devfeed.tech/tags/async.md>), [await](<https://devfeed.tech/tags/await.md>), [axios](<https://devfeed.tech/tags/axios.md>), [beginners](<https://devfeed.tech/tags/beginners.md>), [browser](<https://devfeed.tech/tags/browser.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [component](<https://devfeed.tech/tags/component.md>), [effect](<https://devfeed.tech/tags/effect.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [fundamentals](<https://devfeed.tech/tags/fundamentals.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [learn](<https://devfeed.tech/tags/learn.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [react](<https://devfeed.tech/tags/react.md>), [react-fetch-data-hooks](<https://devfeed.tech/tags/react-fetch-data-hooks.md>), [react-hooks](<https://devfeed.tech/tags/react-hooks.md>), [state](<https://devfeed.tech/tags/state.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

A tutorial on fetching data in client-side React with built-in React Hooks. It explains state and effect management, builds a reusable custom data-fetching hook using the Hacker News API, and shows how to use axios or the browser's native fetch API, including handling asynchronous effects and cleanup functions.

### Source excerpt

Learn the fundamentals about data fetching in client-side React with React Hooks ...

## Git Workflow Explained

DevFeed: [Git Workflow Explained](<https://devfeed.tech/articles/git-workflow-explained-17741.md>)

Original publisher: [Read original article](<https://blog.amigoscode.com/p/git-workflow-explained>)

Author: Nelson Djalo

Published: 2024-07-25T16:39:47Z

Content type: tutorial

Language: en

Sources: [Amigoscode Newsletter](<https://devfeed.tech/sources/amigoscode-newsletter.md>)

Topics: [Git](<https://devfeed.tech/topics/git.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [coding](<https://devfeed.tech/tags/coding.md>), [commands](<https://devfeed.tech/tags/commands.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [git](<https://devfeed.tech/tags/git.md>), [github](<https://devfeed.tech/tags/github.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [local](<https://devfeed.tech/tags/local.md>), [remote](<https://devfeed.tech/tags/remote.md>), [repo](<https://devfeed.tech/tags/repo.md>), [sync](<https://devfeed.tech/tags/sync.md>), [version-control](<https://devfeed.tech/tags/version-control.md>), [workflow](<https://devfeed.tech/tags/workflow.md>)

### AI overview

A tutorial explaining Git's workflow from the working directory and staging area to the local repository and remote repository. It describes how add, commit, fetch, pull, and push support tracking and sharing changes in collaborative projects.

### Source excerpt

From local to remote repo

## IPFS News Issue 204

DevFeed: [IPFS News Issue 204](<https://devfeed.tech/articles/ipfs-news-issue-204-35635.md>)

Original publisher: [Read original article](<https://blog.ipfs.tech/newsletter-204/>)

Published: 2024-04-30T00:00:00Z

Content type: news

Language: en

Sources: [IPFS](<https://devfeed.tech/sources/ipfs.md>)

Topics: [IPFS](<https://devfeed.tech/topics/ipfs.md>), [fetch](<https://devfeed.tech/topics/fetch.md>), [Networks](<https://devfeed.tech/topics/networks.md>)

Tags: [event](<https://devfeed.tech/tags/event.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [gateway](<https://devfeed.tech/tags/gateway.md>), [helia](<https://devfeed.tech/tags/helia.md>), [ipfs](<https://devfeed.tech/tags/ipfs.md>), [kubo](<https://devfeed.tech/tags/kubo.md>), [libp2p](<https://devfeed.tech/tags/libp2p.md>), [news](<https://devfeed.tech/tags/news.md>), [object-object](<https://devfeed.tech/tags/object-object.md>)

### AI overview

IPFS News 204 highlights registration for IPFS Camp 2024, the release of a fetch-like Web-native abstraction for retrieving content from IPFS-compatible networks, Helia's usage survey, and recent IPFS ecosystem updates.

### Source excerpt

Welcome to IPFS News 204! Featuring @helia/verified-fetch and the IPFS Camp 2024 track list.

## Understanding Kotlin Flow flatMapMerge behavior

DevFeed: [Understanding Kotlin Flow flatMapMerge behavior](<https://devfeed.tech/articles/flatmapmerge-is-weird-39307.md>)

Original publisher: [Read original article](<https://kt.academy/article/flat_map_merge>)

Published: 2024-03-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [kotlin-flow](<https://devfeed.tech/topics/kotlin-flow.md>), [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [kotlin-flow](<https://devfeed.tech/tags/kotlin-flow.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This article explains surprising aspects of Kotlin Flow's flatMapMerge, including its synchronous transformation step, default concurrency limit of 16, and inconsistent behavior when the concurrency is set to 1. It examines the implementation and presents patterns for handling asynchronous transformations.

### Source excerpt

How not to get surprised by flatMapMerge behavior.

## Setting the JDBC Statement.setFetchSize() to 1 for Single Row Queries

DevFeed: [Setting the JDBC Statement.setFetchSize() to 1 for Single Row Queries](<https://devfeed.tech/articles/setting-the-jdbc-statement-setfetchsize-to-1-for-single-row-queries-28959.md>)

Original publisher: [Read original article](<https://blog.jooq.org/setting-the-jdbc-statement-setfetchsize-to-1-for-single-row-queries/>)

Author: lukaseder

Published: 2022-05-11T08:55:41Z

Content type: article

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [rdbms](<https://devfeed.tech/topics/rdbms.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [db2](<https://devfeed.tech/tags/db2.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [fetch-size](<https://devfeed.tech/tags/fetch-size.md>), [fetchsize](<https://devfeed.tech/tags/fetchsize.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-development](<https://devfeed.tech/tags/jooq-development.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [ojdbc](<https://devfeed.tech/tags/ojdbc.md>), [optimisation](<https://devfeed.tech/tags/optimisation.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [rdbms](<https://devfeed.tech/tags/rdbms.md>), [sql](<https://devfeed.tech/tags/sql.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>)

### AI overview

This article examines whether jOOQ should call JDBC Statement.setFetchSize(1) by default for queries expected to return at most one row. It proposes measuring the effect with a JMH benchmark and discusses limitations on comparing execution speed across RDBMS.

### Source excerpt

An interesting hint by Vladimir Sitnikov has made me think about a new benchmark for jOOQ: The benchmark should check whether single row queries should have a JDBC Statement.setFetchSize(1) call made to them by default. The Javadoc of the method says: Gives the JDBC driver a hint as to the number of rows that should ... Continue reading Setting the JDBC Statement.setFetchSize() to 1 for Single Row Queries ->

## Node.js 17.5.0 (Current)

DevFeed: [Node.js 17.5.0 (Current)](<https://devfeed.tech/articles/node-js-17-5-0-current-2643.md>)

Original publisher: [Read original article](<https://nodejs.org/en/blog/release/v17.5.0>)

Published: 2022-02-10T18:31:29Z

Content type: release

Language: en

Sources: [Node.js Blog](<https://devfeed.tech/sources/node-js-blog.md>)

Topics: [Node.js](<https://devfeed.tech/topics/node-js.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [cross-platform](<https://devfeed.tech/topics/cross-platform.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [cross-platform](<https://devfeed.tech/tags/cross-platform.md>), [eslint](<https://devfeed.tech/tags/eslint.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js](<https://devfeed.tech/tags/js.md>), [libuv](<https://devfeed.tech/tags/libuv.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [npm](<https://devfeed.tech/tags/npm.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [python](<https://devfeed.tech/tags/python.md>), [servers](<https://devfeed.tech/tags/servers.md>), [v8](<https://devfeed.tech/tags/v8.md>)

### AI overview

Node.js 17.5.0 is a Current release that adds experimental support for the fetch API behind a flag, along with several stream iterator helpers and other minor changes. The release also updates npm to 8.4.1 and includes build, crypto, benchmark, and dependency maintenance.

### Source excerpt

Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.

## Getting Started With Apollo Client in Next.js

DevFeed: [Getting Started With Apollo Client in Next.js](<https://devfeed.tech/articles/getting-started-with-apollo-client-in-next-js-23470.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/next-js-getting-started>)

Author: Kurt Kemple

Published: 2021-03-09T14:52:25Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [Next.js](<https://devfeed.tech/topics/next-js.md>), [data](<https://devfeed.tech/topics/data.md>), [Server-side rendering](<https://devfeed.tech/topics/server-side-rendering.md>), [API](<https://devfeed.tech/topics/api.md>), [React](<https://devfeed.tech/topics/react.md>), [render](<https://devfeed.tech/topics/render.md>), [Search engine optimization (SEO)](<https://devfeed.tech/topics/seo.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [browser](<https://devfeed.tech/tags/browser.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [getting-started](<https://devfeed.tech/tags/getting-started.md>), [next-js](<https://devfeed.tech/tags/next-js.md>), [react](<https://devfeed.tech/tags/react.md>), [render](<https://devfeed.tech/tags/render.md>), [seo](<https://devfeed.tech/tags/seo.md>), [server-side-rendering](<https://devfeed.tech/tags/server-side-rendering.md>)

### AI overview

A tutorial on configuring Apollo Client with Next.js. It compares static, server-side, and client-side data fetching and rendering, explains their tradeoffs for freshness, response latency, and SEO, and demonstrates setting up a Next.js app with Apollo Client and an API.

### Source excerpt

Wait, you want me to put my data where!? Figuring out how to configure Apollo Client with Next.js can be a bit confusing. This confusion stems from the fact that there are three ways to fetch and render data: static, server-side, and client-side. There are benefits and tradeoffs to each strategy, but I'm happy to report that Apollo Client is compatible with all three!

## What is a GraphQL query? GraphQL query examples using Apollo Explorer

DevFeed: [What is a GraphQL query? GraphQL query examples using Apollo Explorer](<https://devfeed.tech/articles/what-is-a-graphql-query-graphql-query-examples-using-apollo-explorer-23575.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/what-is-a-graphql-query-graphql-query-using-apollo-explorer>)

Author: Khalil Stemmler

Published: 2021-02-19T11:06:32Z

Content type: tutorial

Language: en

Sources: [Apollo Blog](<https://devfeed.tech/sources/apollo-blog.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [ide](<https://devfeed.tech/topics/ide.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [curl](<https://devfeed.tech/tags/curl.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [json](<https://devfeed.tech/tags/json.md>)

### AI overview

This tutorial explains what GraphQL queries are, how queries differ from mutations, how nested fields shape requested data, and how results are returned in JSON. It also demonstrates writing and executing queries with Apollo Explorer and mentions curl, fetch, and GraphQL client libraries as alternative approaches.

### Source excerpt

Queries are the one of the first things we learn about in GraphQL. Combined with great tooling, GraphQL's declarative approach to asking for the data you want makes the query-writing experience quite enjoyable. In this post, we'll cover what GraphQL queries are and how they work. We'll also learn how to write and execute GraphQL queries using Apollo Explorer: a powerful GraphQL IDE. Understanding GraphQL queries What is a GraphQL query?

## Working with Apollo Client Cache: Cache Keys, Invalidation, and Fetch Policies

DevFeed: [Working with Apollo Client Cache: Cache Keys, Invalidation, and Fetch Policies](<https://devfeed.tech/articles/tips-and-tricks-for-working-with-apollo-cache-19125.md>)

Original publisher: [Read original article](<https://medium.com/rbi-tech/tips-and-tricks-for-working-with-apollo-cache-3b5a757f10a0?source=rss----904782439303---4>)

Author: Tommy Suwunrut

Published: 2020-10-29T19:16:34Z

Content type: tutorial

Language: en

Sources: [RBI Tech](<https://devfeed.tech/sources/rbi-tech.md>)

Topics: [apollo-client](<https://devfeed.tech/topics/apollo-client.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [GraphQL](<https://devfeed.tech/topics/graphql.md>), [Front end](<https://devfeed.tech/topics/frontend.md>)

Tags: [apollo](<https://devfeed.tech/tags/apollo.md>), [apollo-client](<https://devfeed.tech/tags/apollo-client.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cache-invalidation](<https://devfeed.tech/tags/cache-invalidation.md>), [caching](<https://devfeed.tech/tags/caching.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [programming](<https://devfeed.tech/tags/programming.md>), [react](<https://devfeed.tech/tags/react.md>)

### AI overview

This tutorial explains how Apollo Client normalizes and stores GraphQL query results, including cache keys based on object properties and schema types. It discusses why collection queries may remain stale after server-side updates and introduces fetch policies as one way to manage cache behavior.

### Source excerpt

Photo by Stephen Walker on Unsplash With its declarative fetching, helpful tooling, extensive type definitions, and built-in integration with React, Apollo Client has played a fundamental role in simplifying frontend architecture over the past few years. Its built-in caching layer, which allows you to retrieve previously requested data without needing to make additional network requests to the server, has the potential to make any application feel snappier. Apollo even provides ways of warming up the cache to be used for later, freeing our frontends from the dreaded loading spinners. But cache invalidation is one of those notoriously difficult problems in any computer program, and trying to update or bust Apollo's cache after server-side updates is far from a perfect experience, especially when the queries being cached have many filters and constraints. Let's begin with an overview of how Apollo's cache works, and then discuss the tradeoffs involved with a few different approaches to working with it. Throughout this article we'll be using this Mock List application as a reference. Cache Keys When you make any graphQL query, by default Apollo caches the response in what it calls a flat, normalized lookup table. It constructs a unique identifier for each object returned from your query, by combining its id or _id properties with the __typename defined in your schema. So if the application above executes queries as the user types "G", then "Go", then "Go g", all the way to "Go groceries shopping", Apollo could potentially pull down information about many different tasks and cache each one roughly like this: Task:1234: { name: "Go grocery shopping" } Task:2345: { name: "Go to gym" } Task:3456: { name: "Learn GoLang" } This is great if the user navigates to a detail view about a given task, because there will already be some data immediately available. Apollo will also store the results of each of those individual queries, in case you make the same exact query again late

## How to Debug CORS Errors in JavaScript

DevFeed: [How to Debug CORS Errors in JavaScript](<https://devfeed.tech/articles/how-to-debug-any-cors-error-19064.md>)

Original publisher: [Read original article](<https://httptoolkit.com/blog/how-to-debug-cors-errors/>)

Author: HTTP Toolkit; Tim Perry

Published: 2020-10-07T14:30:00Z

Content type: tutorial

Language: en

Sources: [HTTP Toolkit](<https://devfeed.tech/sources/http-toolkit.md>)

Topics: [Cross-origin resource sharing (CORS)](<https://devfeed.tech/topics/cors.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [cors](<https://devfeed.tech/tags/cors.md>), [debug](<https://devfeed.tech/tags/debug.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [errors](<https://devfeed.tech/tags/errors.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>)

### AI overview

This tutorial explains how to recognize and debug CORS errors in JavaScript. It describes browser same-origin protections, common preflight and response-header errors, and the security risks CORS helps prevent.

### Source excerpt

Your request is hitting an error due to CORS. Not all is lost! Most CORS errors are quick & easy to debug and fix, once you understand the basics. Let's sort it out. You know you're hitting a CORS error when you see error messages like: Access to fetch at 'https://example.com' from origin 'http://localhost:8000' has been blocked by CORS policy. No 'Access-Control-Allow-Origin' header is present on the requested resource Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://example.com/ Response to preflight request doesn't pass access control check The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include' Method PUT is not allowed by Access-Control-Allow-Methods in preflight response. Request header field custom is not allowed by Access-Control-Allow-Headers in preflight response. In each of these cases, you've asked JavaScript running in your page to send a request to a different origin, and at some stage the browser is refusing to do what you want. What is CORS? When you include JavaScript in a web page, you're running code on your user's computer, inside their browsing session. That's a lot of power, and browsers are designed to protect users from the risks of this. CORS is one of these protections, aiming to protect the user and the services they use from two main attacks: CORS stops you from using the user's existing login session (their cookies and other cached authentication details) when communicating with other servers. JavaScript on your web page shouldn't be able to send requests to the Facebook API using their existing Facebook session. Without CORS, any web page could talk to other servers as you. CORS stops you from talking to servers that might only be accessible from their machine, but which aren't accessible publicly. Your web page should not be able to send requests to my-intranet-server.local, which might be an

## Disguise-Driven Testing: Jest Mocks in Depth

DevFeed: [Disguise-Driven Testing: Jest Mocks in Depth](<https://devfeed.tech/articles/disguise-driven-testing-jest-mocks-in-depth-21875.md>)

Original publisher: [Read original article](<https://ponyfoo.com/articles/disguise-driven-testing-jest-mocks-in-depth>)

Author: jsmapr1@gmail.com (Joe Morgan)

Published: 2019-03-28T03:18:25Z

Content type: tutorial

Language: en

Sources: [Pony Foo](<https://devfeed.tech/sources/pony-foo.md>)

Topics: [Jest](<https://devfeed.tech/topics/jest.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Code](<https://devfeed.tech/topics/code.md>), [API](<https://devfeed.tech/topics/api.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [code](<https://devfeed.tech/tags/code.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [external](<https://devfeed.tech/tags/external.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [jest](<https://devfeed.tech/tags/jest.md>), [json](<https://devfeed.tech/tags/json.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tool](<https://devfeed.tech/tags/tool.md>)

### AI overview

This tutorial explains why impure functions and external dependencies make testing difficult, using date calculations and API data fetching as examples. It presents Jest mocks as a way to replace function results and simplify tests.

### Source excerpt

Testing can be simple. In fact, it is simple. Well, it is simple until impurities slip in. Code that would be easy to test becomes a nightmare as soon as you get impure data (like date checks) or complex external dependencies (such as DOM manipulations or large 3rd party libraries). The part that tends to frustrate developers most is when they have code that's easy to read, easy to write, but difficult to test. No one wants to spend more time on their tests than they do on their code. Consider an example. Let's say you needed to write some code that checks to see if a given date is two weeks from today. If they date is far enough away, you get an empty string. If the date is less than two weeks away, you get an error message: import moment from 'moment'; export const message = 'Date must be two weeks from now' export function isAtLeastTwoWeeks(date) { const isLater = moment(date).isAfter(moment().add(2, 'weeks')); return isLater ? '' : message; } That's pretty simple code. But how do you write a test for it? Things can get tricky fast. Here's an even more basic example. You want to fetch some data from an API and display the first couple items: export function getRecent() { return fetch('/albums') .then(response => response.json()) .then(albums => { return albums .reverse() .slice(0, 2) .map(({title}) => title); }) } Simple to read. Simple to understand. But how would you test it without hitting the live API? There's an unfortunate belief that testing is hard. Early in my career, I heard one developer estimate that it doubled development time. And he was arguing for testing, that it was worth the extra time. The problem is that most testing is easy. But testing impure functions can be very, very difficult. Fortunately, the Jest testing framework has simplified a lot of the complexities behind testing. The secret is a tool called a mock. A mock is effectively a shortened version of a function. Instead of running the function you stub out the result you want. Your cod

## Reactive State Mutations via CQRS

DevFeed: [Reactive State Mutations via CQRS](<https://devfeed.tech/articles/reactive-state-mutations-via-cqrs-29374.md>)

Original publisher: [Read original article](<https://arturdryomov.dev/posts/reactive-state-mutations/>)

Author: Artur Dryomov

Published: 2018-10-21T00:00:00Z

Content type: article

Language: en

Sources: [Artur Dryomov](<https://devfeed.tech/sources/artur-dryomov.md>)

Topics: [reactive](<https://devfeed.tech/topics/reactive.md>), [Development](<https://devfeed.tech/topics/development.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>)

Tags: [agile](<https://devfeed.tech/tags/agile.md>), [backend](<https://devfeed.tech/tags/backend.md>), [cache](<https://devfeed.tech/tags/cache.md>), [can](<https://devfeed.tech/tags/can.md>), [development](<https://devfeed.tech/tags/development.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [mutation](<https://devfeed.tech/tags/mutation.md>), [production](<https://devfeed.tech/tags/production.md>), [qa](<https://devfeed.tech/tags/qa.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [software](<https://devfeed.tech/tags/software.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [state](<https://devfeed.tech/tags/state.md>), [stateful](<https://devfeed.tech/tags/stateful.md>), [thread](<https://devfeed.tech/tags/thread.md>)

### AI overview

The article introduces state and state mutations in software development, then uses a book-recommendation project to show how changing requirements can make client logic increasingly complicated. It discusses duplicated distributed logic, stateful behavior, side effects, caching, and thread-safety concerns, but the supplied text does not include the proposed CQRS solution.

### Source excerpt

State-state-state. It surrounds us. Think hard enough and everything around will become either a state or a state mutation. The current time is a state and each passing second is a state mutation. A tree can be represented by a state and each drop of rain mutates it, increasing the water supply level and applying the pressure on leaves. The concept is not new, but sometimes it becomes too hard to manage it. Even in software development, which was basically created to represent the world around us in strict terms.

## Rest API Error Handling

DevFeed: [Rest API Error Handling](<https://devfeed.tech/articles/rest-api-error-handling-19494.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/rest-api-error-handling/>)

Author: Shai Almog

Published: 2018-08-12T00:00:00Z

Content type: release

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [REST API](<https://devfeed.tech/topics/rest-api.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [callback](<https://devfeed.tech/tags/callback.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [fetch](<https://devfeed.tech/tags/fetch.md>), [json](<https://devfeed.tech/tags/json.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [release](<https://devfeed.tech/tags/release.md>), [rest](<https://devfeed.tech/tags/rest.md>), [rest-api](<https://devfeed.tech/tags/rest-api.md>)

### AI overview

The article describes a rework of Codename One's REST API to address inconsistent error handling, including errors returned in formats other than JSON. It introduces the OnComplete interface, deprecates existing asynchronous calls, adds property business object support, and renames affected asynchronous methods with a fetch prefix.

### Source excerpt

We added a lot of features and fixed bugs over the past couple of months and I've been a bit lax on blogging. I'll try to fix that as we approach the revised 5.0 release date. One of the big changes we added over the weekend (it will be in the builds on Friday), is a huge rework of the Rest API. If you are unfamiliar with the Rest API check out this older post. The Rest API had a few problems, the most pressing of these was the inconsistent error handling behavior. A failure of the Rest call didn't always trigger error handling correctly and behaved inconsistently on reading the response of the error.

[Next page](<https://devfeed.tech/tags/fetch.md?cursor=WyIyMDE4LTA4LTEyVDAwOjAwOjAwKzAwOjAwIiwgImU3NmUzOTk0LTQyMzQtNDJlZS1hZjI5LTAxZjU3NWZiM2VlNyJd>)