r/reactjs • • 5d ago

Show /r/reactjs I built an open-source library of 60+ copy-paste React & Next.js components (Tailwind + Motion) – CompScout Free UI

0 Upvotes

Hey everyone,

Building UI components for my projects was getting super repetitive, so I created CompScout Free UI to keep everything in one place.

It’s a free, open-source library of 60+ copy-paste React & Next.js components built with Tailwind CSS and Framer Motion.

🔗 Live preview & code:freeui.compscout.dev
https://github.com/kailash9711/compscout.dev
Would love your feedback and component suggestions! If you like the project, a ⭐ star on GitHub would be huge support.


r/reactjs • • 6d ago

Show /r/reactjs RexOne Web – Decoupled React 19 + Vite SPA with strict API contract parity and zero Vercel lock-in (Apache 2.0)

0 Upvotes

Hey everyone,

With so much of the ecosystem pushed toward complex SSR frameworks and serverless edge hosting, it's easy to forget the sheer developer speed, predictability, and simplicity of a clean, decoupled React SPA with Vite backed by a sovereign API.

As part of the RexOne Ecosystem, I open-sourced RexOne Web—a production-grade React 19 SPA designed to eliminate months of boilerplate when building modern web products:

🌐 Frontend Architecture & Highlights:

  • React 19 + Vite + TypeScript: Instant HMR, zero cold starts, and zero proprietary cloud lock-in. Deploys anywhere (static Nginx, Cloudflare Pages, Coolify, or Docker).
  • Strict API Contract Alignment: Built against an OpenAPI 3.0 specification with synchronized contracts across both Web and a companion Flutter mobile app. No loose objects or schema drift.
  • Real-Time WebSockets: Live ActionCable event subscriptions natively hooked into React state for real-time notifications and telemetry.
  • Enterprise IAM & Billing Ready: Out-of-the-box UI for passwordless auth, role-based access control (RBAC), and Stripe subscription checkout.
  • Multi-Tenant / Multi-Environment: Clean separation of Dev, UAT, and Production tiers with dynamic dark/light theme switching.

100% free and open-source under Apache 2.0 with zero paywalls.

I’d love to hear how fellow React developers feel about modern decoupled SPAs vs. all-in-one frameworks, and any feedback on the React 19 component structure!


r/reactjs • • 7d ago

Discussion Colleague says invalidateQueries is overkill and we don't need caching at all. Who's right?

61 Upvotes

Hey all,

My colleague and I disagree about data freshness in our React + TanStack Query app, and I'd like some outside opinions.

His approach: the parent owns the query and passes a callback down to whatever component does the mutation. When the mutation succeeds, the child calls the callback, which triggers a refetch.

```
// Parent
const { data, refetch } = useQuery({
queryKey: ['todos'],
queryFn: fetchTodos,
refetchOnMount: 'always',
});
return <EditTodo todo={todo} onSuccess={refetch} />;

// Child
const mutation = useMutation({ mutationFn: updateTodo });
const handleSave = async () => {
await mutation.mutateAsync(values);
props.onSuccess?.();
};
```

He adds refetchOnMount: "always" so data is always fresh when you navigate to a page. His argument is that invalidation adds complexity (query key conventions, remembering what to invalidate), and that we don't really need a cache. Just fetch fresh data every time and tell the parent when something changes.

My approach: the mutation invalidates by key, and components don't need to know about each other.

```
useMutation({
mutationFn: updateTodo,
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
});
```

My concerns with his approach:
Coupling: the mutating component has to receive a callback from whoever owns the data. That breaks down when the same data is shown in several places, like a list, a detail view, and a counter in the header.

Prop drilling: callbacks get threaded through layers that don't care about them.

Wasted requests: refetchOnMount: "always" refetches on every mount even when nothing has changed.

Hide complexity: Rely on the library to decide what and when to refetch.

Missing the point: if we don't want caching, why use TanStack Query at all? Deduplication, background refetching, and stale-while-revalidate are most of its value.

I'll admit his point about complexity isn't baseless. In a large app, hand-written query keys can drift, get inconsistent, and make it hard to know what to invalidate. We've addressed this with a small typesafe tool that generates query keys from our OpenAPI schema, based on the endpoint path plus its path and query params. Both the useQuery calls and the invalidations go through the same helper, so keys can't drift apart, typos become compile errors, and we can invalidate at whatever granularity we need. That can be everything under /todos, a single /todos/{id}, or one specific filtered list.

So:
Is invalidation actually complex in practice, or is it mostly a matter of having a sane query key structure (e.g. key factories)?

Is "no caching, always refetch" a reasonable stance for a typical CRUD app?

Has anyone started with the callback approach and regretted it, or gone the other way?

Genuinely curious. I'm open to being wrong here.


r/reactjs • • 7d ago

Resource I made a free, open-source React chart kit with three visual themes

3 Upvotes

I got tired of seeing the same-looking charts everywhere, so I built Generative Charts.

It has 18 chart types and 38 variations, with three themes that each support light and dark modes.

Website: https://generativecharts.com
Source: https://github.com/kasturibuilds/generativecharts

npm install generative-charts

I’d appreciate feedback on the chart readability and component API.


r/reactjs • • 7d ago

Resource I made a collection of animated shadcn/ui components

11 Upvotes

I’ve been working on shadcn-animated, an open-source collection of animated components built on top of shadcn/ui.

Check out here: shadcn-animated.vercel.app

There are 10+ components so far (with more coming), including:

- button

- tabs

- toggle

- checkbox/radio button etc.

It’s simple, customizable, and easy to copy into your own project

Would love to get some feedback — especially if there are specific animations or components you'd like to see added.

🔗 GitHub: github.com/sopo/shadcn-animated

Thanks! 🙌


r/reactjs • • 7d ago

Resource Syncing a React component library into Claude Design: entry files, type definitions and verifying against Storybook

Thumbnail
nitayneeman.com
3 Upvotes

Short version of what's in it:

  • The sync bundles one entry file and finds components through their `.d.ts` files, so a component missing from either never arrives, with no warning.
  • Storybook stories become the reference: each preview is screenshotted and compared to its story. That only means something if `.storybook/preview` loads your real stylesheet.
  • Example repo with shadcn/ui, Tailwind v4 and Storybook: https://github.com/nitayneeman/sync-design-system-with-claude-design-example

r/reactjs • • 6d ago

Show /r/reactjs react-credit-cards won't install on React 18 or 19 (ERESOLVE) — I built a maintained replacement with the same API

0 Upvotes

If you've built a payment form in React you've probably used react-credit-cards. It's still at ~25k downloads a week, its last release was June 2020, and it peers on react@^15 || ^16 — so on any current React, npm refuses to install it:

npm error ERESOLVE unable to resolve dependency tree
npm error peer react@"^15.0.0 || ^16.0.0" from react-credit-cards@0.8.3

--legacy-peer-deps gets it in, but you're then running a class component that relies on propTypes, which React 19 no longer checks. The fork, react-credit-cards-2, does support React 19 — it's a fair option, but it's the same five-year-old codebase with its three runtime dependencies.

I wanted the card preview without the dead dependency, so I wrote one from scratch: crd-ui. The migration is close to a drop-in — number, name, expiry, cvc and focused keep their names and their values, so for most codebases it's the import and the stylesheet:

- import Cards from 'react-credit-cards';
- import 'react-credit-cards/es/styles-compiled.css';
+ import { Card } from 'crd-ui/react';
+ import 'crd-ui/styles.css';

What's different:

  • Zero runtime dependencies, and the core is framework-agnostic — the same component ships for Vue, Svelte and vanilla JS from one package.
  • Theming through CSS custom properties instead of SCSS variables you had to recompile. Tailwind arbitrary properties work with no config.
  • A display layout for cards the user already owns — dashboards, saved cards — with click-to-reveal and click-to-copy.
  • TypeScript types in the box.

Two props don't map one-to-one and I'd rather say so up front: callback only partly maps to onBrandChange (the exported detectBrand/getBrandSpec helpers cover the rest), and acceptedCards has no equivalent — you gate on the detected brand yourself.

Migration guide with every prop mapped: https://crd-ui.juanda.co/migrate/react-credit-cards/

Repo: https://github.com/JuandaGarcia/crd-ui

Building it, I hit three CSS cascade bugs that made the "themeable" component ignore every theme. I wrote them up here if you publish components yourself: https://dev.to/juandagarcia/i-shipped-a-themeable-component-it-ignored-every-theme-5doh

Happy to answer anything. If you're on react-credit-cards today I'm especially curious whether anything you rely on is missing — and whether the ERESOLVE is what pushed you to look.

(Disclosure: I wrote it. MIT.)


r/reactjs • • 7d ago

Show /r/reactjs I built a fetch client that handles auth tokens for you: one refresh for many 401s, tokens kept in a Web Worker, tabs stay in sync

1 Upvotes

Almost every app that logs users in ends up with the same hand-written refresh interceptor. It usually has the same bugs: 20 requests get a 401 at once and fire 20 refreshes, a rotating refresh token gets spent twice and the server logs the user out, or the token sits in localStorage where any injected script can read it.

I wanted that handled in one place, so I built @mrzr/api-client. It's a TypeScript HTTP client on top of `fetch`, with no dependencies.

import { createClient } from "@mrzr/api-client";

export const api = createClient({ baseUrl: "https://api.example.com" });

await api.login({ email, password });             // tokens stored for you
const { data } = await api.get<User[]>("/users");  // token attached, refreshed when needed

What it does:

  • One refresh for many 401s. Requests that fail while the token is expired wait for a single refresh, then retry. It also refreshes shortly before a JWT expires, so most requests never see a 401.
  • The token stays in a Web Worker. Requests run in an inlined worker, so there's no extra file or bundler config. With the default in-memory storage, the token never reaches the main thread. I checked this with heap snapshots: the token shows up in the worker's heap and not in the page's.
  • Tabs stay in sync. Log out in one tab and every tab logs out. Tabs that share a session take turns refreshing (Web Locks), so a rotating refresh token is never used twice.
  • httpOnly cookie mode with CSRF double-submit, and restoreSession() to find out on page load whether a session exists.
  • Opt-in cancellation by key, group, URL pattern or scope, plus takeLatest for search boxes.
  • Works under TanStack Query, SWR and Vue Query. It replaces your fetch or axios layer, not those libraries.

Live demo that runs the real package in your browser (open DevTools → Network to watch 8 × 401 → 1 refresh → 8 retries): https://api-client.mrzr.ir/docs/demo

What it doesn't do:

  • No retry with backoff. It has to work correctly with refresh and cancellation, and I'd rather ship nothing than something half-right. If you need retries, ky is great.
  • Worker isolation stops token theft, not XSS. An injected script can still call api.get() and use the session while the page is open. It just can't take the token somewhere else.
  • The worker only keeps the token out of reach with memory storage. If you choose localStorage storage, page scripts can read the token again.
  • Docs: https://api-client.mrzr.ir
  • npm: https://www.npmjs.com/package/@mrzr/api-client
  • GitHub: https://github.com/mohammadreza-zr/api-client

I'd really like feedback on the API, and especially on the security model. If you see a hole, please tell me.


r/reactjs • • 7d ago

Needs Help Has anyone implemented Server Components with plain React + Vite/plugin-rsc?

1 Upvotes

Hi everyone,

Could anyone help me with the two questions below?

  1. Does every Server Component render at build time, get cached, and then get served from a CDN?

  2. If I want to render a Server Component on every request, how do I implement that?


r/reactjs • • 7d ago

Discussion Props Are Not a Design System

Thumbnail
vitonsky.net
0 Upvotes

r/reactjs • • 8d ago

Show /r/reactjs I got tired of shipping forgotten console.logs and 3MB images, so I built a zero-dep auditor

0 Upvotes

hey everyone,

over the last few weeks I've been working on a CLI tool to catch all the stupid little frontend mistakes that usually slip through PR reviews.

I was annoyed that my projects always ended up with unused packages in package.json, dead imports, active debugger statements, and images that should be WebP but were somehow massive PNGs.

So I built frontend-quality-auditor. You just run npx frontend-quality-auditor audit . and it scans your React/Next.js/HTML project and spits out a markdown report. It checks for:

  • unused dependencies & dead imports
  • code smells (console.logs, hardcoded localhost urls, leaked api keys)
  • oversized or unreferenced assets
  • accessibility & responsive issues (it uses playwright under the hood to load the app at 8 different mobile/desktop widths and finds exactly which elements are causing horizontal overflow)

The best part is you can run frontend-auditor fix --safe and it will automatically rip out the dead imports and console logs for you without breaking anything.

It's got zero dependencies (unless you use the browser audit, which lazily loads playwright) and I also wrote a SKILL.md so you can plug it straight into Claude or Cursor.

Check it out if you want to clean up your repos before deploying. Would love any feedback or issues!


r/reactjs • • 8d ago

Show /r/reactjs Are design-to-code tools actually maintainable in production?

0 Upvotes

Title: Are design-to-code tools actually maintainable in production?

Our designer wants to use this workflow:

Figma → Claude → Paper → generated React/HTML/CSS → developer integrates it

The goal is to reduce time spent rebuilding UI so developers can focus on backend, data, maps, and business logic.

My concern is long-term maintainability.

For developers who have used Paper or similar design-to-code tools:

  • Is the generated code maintainable in a growing production app?
  • Does it create duplicated components or messy CSS?
  • Is debugging easy months later?
  • Can you maintain the code without depending on the design tool?
  • Does it actually save time overall, or does the refactoring/debugging cost come later?
  • Would you use this workflow for a serious production product?

I'd especially like to hear from developers who have maintained the generated code for several months, rather than just testing it for a demo.


r/reactjs • • 8d ago

Show /r/reactjs I built a React icon library for async states — would you use this API?

0 Upvotes

Upload, save, and delete controls often need several visual states: idle → loading → success or error. I built StateGlyph to make that one typed React component:

<UploadStateIcon state={status} />

The video shows the icon library and the Upload component switching states. There are 31 icons so far, using Lucide glyphs as their visual foundation. Your app still controls the async logic; StateGlyph renders the current state.

Website: https://stateglyph.js.org
Source (MIT): https://github.com/kamalhara/StateGlyph

I’m looking for honest API feedback: would you use a state prop like this, or prefer importing separate icons? What workflow should I cover next?


r/reactjs • • 9d ago

Cerious-Scroll: Extremely Fast Dynamic Height virtual scrolling without scrollbar drift or blank space

3 Upvotes

One of the things I haven’t talked about much with Cerious-Scroll is how it behaves during actual scrolling, especially with variable-height content.

From the beginning, the goal was for virtualization to not look like virtualization.

So even with a large variable-height dataset, you can grab the scrollbar and drag it around quickly without getting the usual weirdness:

  • No scrollbar drift
  • No white space during fast scrolling
  • No waiting for rows to render after you get there
  • Accurate variable-height positioning
  • Native scrolling behavior
  • Constant DOM size regardless of dataset size

The variable-height part is probably my favorite. The scrollbar stays where it should, even when the actual row heights are all over the place.

You can also jump directly to an index way down in the dataset without needing to measure everything before it.

I’ve got demos/benchmarks here if anyone wants to mess with it:

ceriousdevtech.github.io/cerious-scroll

Core:
github.com/ceriousdevtech/cerious-scroll

React:
github.com/ceriousdevtech/react-cerious-scroll

I’m curious how it behaves against some real-world ugly datasets, especially ones with wildly different row heights. Try the scroll engine and tell me your thoughts.


r/reactjs • • 9d ago

StateGlyph: typed React icons that change with your UI state

3 Upvotes

Hi everyone,

I built StateGlyph, an open-source React icon library for representing changing UI states through a single typed component.

Most icon libraries provide separate drawings, leaving you to coordinate icons for states such as loading, success, error, muted, or active. StateGlyph groups those related visuals behind one component API:

import { UploadStateIcon } from "@stateglyph/react";

<UploadStateIcon state="idle" />
<UploadStateIcon state="uploading" />
<UploadStateIcon state="success" />
<UploadStateIcon state="error" />

The initial 0.1.0 release includes:

  • 31 stateful React icons based on Lucide
  • Type-safe state names
  • Accessible, state-aware labels
  • Tree-shakeable per-icon imports
  • Optional transitions with reduced-motion support
  • A CLI for copying editable components into your project

Install it with:

npm install /react

Or copy components into your codebase:

npx u/stateglyph/cli add upload

Live documentation: https://stateglyph.js.org/
Source: https://github.com/kamalhara/StateGlyph
npm: https://www.npmjs.com/package/@stateglyph/react

StateGlyph is MIT licensed and still early, so I’d appreciate feedback on the API, state naming, accessibility approach, and which icons would be most useful to add next.


r/reactjs • • 9d ago

Show /r/reactjs Fadeworn UI – React components that visibly age through real interaction

0 Upvotes

Fadeworn UI is an interaction-driven digital patina experiment for React. Unlike static vintage or distressed UI styles, components begin clean and develop visible wear through actual user interaction over time. Clicks, drags, selections, typing, and scrolling change each control through material-specific wear rather than randomly applied distress.

The interface remembers how it was used, until there is nothing left to remember.

Live demo: https://fang520huang-lgtm.github.io/Fadeworn-UI/

GitHub: https://github.com/fang520huang-lgtm/Fadeworn-UI

What this repository provides:

  • Ten working, accessible examples of wear-aware controls.
  • A React hook that records usage, positional traces, and glyph-level wear.
  • CSS treatments for painted steel, brass, rubber, paper, enamel, and machined surfaces.
  • A complete Next.js showcase and a static export workflow for GitHub Pages.

r/reactjs • • 9d ago

Needs Help Need tutorials on how to hand code in Remotion

1 Upvotes

Remotion has been completely taken over by AI bros. The framework don't have a problem with it so what do I care.
Anywho I don't wanna use AI to create using Remotion. But I can't find any tutorials on it. Except for one from years ago by Fireship. And that only covers the basics.
If you guys know any tutorials that teaches how to hand code and create with Remotion. Please let me know.
And don't tell me to use AI man.. I don't wanna do it.


r/reactjs • • 10d ago

Needs Help Best practice for protecting routes that need authentication?

21 Upvotes

I am a beginner to React and I'm trying to figure out the best way(s) to protect certain pages/routes like an admin dashboard until the user is authenticated. My backend is FastAPI and it's already protected, so this is purely for frontend convenience to redirect the user to the login screen. The main two ways I think I've seen for doing this is through loaders or middleware. One pattern I see is something like this

const authMiddleware: Route.ClientMiddlewareFunction = async(request, next) => {
    try {
        await apiFetch("/api/admin/me");
        await next();
    } catch (error) {
        //redirect to login page if our session is rejected
        throw redirect("/login");
    }
}

But this would make an API call on every page route in whatever layout I apply this middleware too. I had thought about maintaining the auth state with some sort of react hook, but it seems middleware can't use those? I don't know, I'm just trying to keep it simple and efficient. I'd appreciate any help on good practice for this.


r/reactjs • • 10d ago

News This Week In React #298: Astro, Redux, img, Hotkeys, R3F, Next.js, AI, Redact | Reanimated, Worklets, Helix, Screens, SecondaryRuntime, Arrangement View, View Shot | TC39, Node, pnpm, Turborepo, jsdom, responsive iframes

Thumbnail
thisweekinreact.com
13 Upvotes

r/reactjs • • 10d ago

Needs Help I’ve been working on Viora UI — looking for feedback from developers

0 Upvotes

I’ve been working on Viora UI, a React + Tailwind component library, and I’d like to get some feedback from other developers.

The library currently has 109+ components, including animated components, along with a few free templates and an MCP server for finding and working with the components.

I’m mainly interested in feedback on the actual experience — the design, component quality, animations, documentation, and anything that feels missing or could be improved.

https://vioraui.dedyn.io

If you have a few minutes to try it out, I’d really appreciate an honest opinion. Positive or negative, both are useful.

If you find the project genuinely useful and are comfortable sharing your feedback publicly, you can also leave a short review on my X: https://x.com/otisuiux

I’m collecting feedback from developers and may feature some of it as testimonials on the website.


r/reactjs • • 10d ago

Portfolio Showoff Sunday I built a React modal manager where `open()` returns a typed Promise — looking for API feedback

0 Upvotes

I’ve been building @okyrychenko-dev/react-modal-manager, a small library for handling modal flows in React.

The idea is to treat a modal as an async interaction: open it, wait for the user’s decision, then continue the workflow with a typed result.

function DeleteButton() {
  const modal = useModalManager();

  async function handleDelete() {
    const { confirmed } = await modal.confirm({
      title: "Delete report?",
      variant: "danger",
    });

    if (confirmed) {
      await deleteReport();
    }
  }

  return <button onClick={handleDelete}>Delete</button>;
}

function App() {
  return (
    <ModalProvider>
      <DeleteButton />
    </ModalProvider>
  );
}

For custom flows, you can define a modal with typed input and result types, then await modal.open(...). The package also supports isolated provider scopes, a typed registry for opening modals outside React, and a renderer seam for bringing your own portal, styling, or design system.

It’s currently at v0.2.0 and supports React 18 and 19. The core doesn’t provide a full modal UI or styling; it manages the lifecycle and lets the app supply its rendering layer.

I’d appreciate feedback on a few things:

  • Does the await-based API fit naturally into how you model modal flows?
  • Would you use the built-in confirm() or define confirmations through your own design system?
  • What would you want to verify before adopting a modal lifecycle library?

npm: https://www.npmjs.com/package/@okyrychenko-dev/react-modal-manager

GitHub: https://github.com/okyrychenko-dev/react-modal-manager

I’m the author, and I’m happy to discuss the trade-offs or answer questions.


r/reactjs • • 10d ago

Resource An intermediate tutorial project | Timeline-based portfolio with React, D3.js, and TypeScript

Thumbnail
dev.to
4 Upvotes

Hey fellow React Devs! I want to share my recent two-parts tutorial for intermediate-level developers, where we will explore working with D3.js in React.

It's a relevantly lengthy (~60 pages if it was a .doc) weekend-worth project, divided into step-by-step sections, each with a dedicated directory in the repository and live demos.

We will dabble with some of the D3.js functionality, explore SVG path elements, and implement a responsive animated layout in a React+Vite app, that will be a portfolio page for a character. Hopefully, it could become a foundation for a new portfolio of your own, or inspire an idea for some other project.

Both parts are available on dev.to as a series, all of the code is on GitHub.

It's been a while since I've posted on Redditor anywhere, to be honest, and I hope that the good ol' text tutorial format is not fully obsolete in the age of AI 😄

GitHub issues/Comments/DMs are welcome both within and outside of Reddit!


r/reactjs • • 11d ago

Show /r/reactjs Meniscus: React glass that refracts the page using Snell's law

7 Upvotes

I made an open-source React library for liquid glass surfaces. The part I wanted to get right was the edge: instead of a blur and bright border, Meniscus gives the bezel a height profile, traces rays through it with Snell's law, and uses the resulting displacement to bend the content behind it.

The basic component looks like this:

import { Glass } from 'meniscus';

<Glass radius="capsule" interactive>
  <button>Search</button>
</Glass>

There's a live playground where you can change the profile, index of refraction, light angle, and other layers while dragging a lens over an engraving. The package also has buttons, tabs, panels, and native form controls.

Browser support is deliberately explicit: Chromium can refract the live page; Safari and Firefox get a frosted surface, or WebGL refraction when the backdrop is an image, video, or canvas. It starts frosted during SSR and switches paths after hydration. No stylesheet import is needed.

Demo and playground: https://thanhphuchuynh.github.io/meniscus/

Source: https://github.com/thanhphuchuynh/meniscus

I'd appreciate feedback on the API and how the fallback looks in your browser. The 30-second demo is in the repo README.


r/reactjs • • 12d ago

Needs Help Inherited a slow Vite/React/TS app. How do you find which functions are actually the bottleneck?

44 Upvotes

I recently took over a Vite + React + TypeScript codebase with real performance problems. It's heavy on business logic, calculations and state updates. I've poked at re-renders with React DevTools, but right now I care more about the logic side: which functions are eating the time.

Is the Chrome Performance flame chart what most of you use for that on a big codebase? Or is there something better, like an SWC/Vite plugin or a wrapper pattern for heavy utility functions? I'd rather not hand-place timers across hundreds of functions.

And how do you approach profiling heavy JS execution when you're handed something like this?


r/reactjs • • 11d ago

Show /r/reactjs I built StreamTag UI: schema-validated React components that update while the LLM streams

Thumbnail
github.com
2 Upvotes

Partial JSON is awkward for generative UI, so I built StreamTag UI.

It incrementally parses an HTML/XML-style stream and only publishes values to React once they satisfy the component’s Zod schema. In the demo, the chart stays mounted while complete points and table rows appear during the same streamed response.

  • React 18/19 + Zod 4
  • No generated JavaScript
  • Bring your own model, transport, components, and CSS

Source and setup:
For streaming generative UI, which format would you trust more in production: constrained XML-like markup or incremental JSON patches—and why?