Data Transformation

This topic groups examples where the interesting problem is shape rather than transport. Turning a record list into a lookup, grouping rows by a computed key, flattening nested structures without recursion surprises, sorting with stable rules, and mapping server records onto the view model a component actually renders are all covered here. Each page states the input shape, the output shape, and the order or duplicate behaviour the reader should expect, because those details decide whether a transformation is safe to reuse. Use the task groups to compare single-pass loops against chained array methods, then follow the relationships into fetch examples that produce the input and typing examples that keep the output honest.

In scope: Include examples that group, flatten, map, filter, sort, or re-model data structures. Out of scope: Exclude database or backend pipeline work, and exclude formatting-only examples with no structural change.

6 published examples across 2 primary task groups. Read the group heading to find the task you are solving, then pick the Example whose assumptions match your page.

Manage React state

2 examples

Declare, derive, update, and share component state inside the React render model.

Transform data

4 examples

Reshape collections and records in memory into the structure the next step needs.

Adjacent navigation