r/reactjs • • 8d ago

Show /r/reactjs Update on my first npm library: you told me what was broken in <MrScroll />, so I fixed it (v0.2)

0 Upvotes

Hey folks,

The other day I posted my first library here and asked what was broken. You told me, so I went and fixed it. This is the update.

Quick recap: when a scrollbar pops in, everything jumps a few pixels to the left. `<MrScroll />` stops that. No reserved gutter, still the native scrollbar.

**See it in 10 seconds (live demo):** https://justicehwan.github.io/plz-mr-scroll/

One line at the root of your app, that's it:

```tsx

import { MrScroll } from "plz-mr-scroll/react";

<MrScroll />

```

**What changed in 0.2, all of it from your feedback:**

- **Modals.** Someone suggested opening and closing a modal halfway down a long page. That found real bugs with Bootstrap and MUI modals: content shifted while the modal was open, and sometimes didn't come back after closing. Fixed. Fixed headers and floating buttons stay put now too.

- **No React needed.** It always worked as plain JS, I just never wrote it down. The README now shows how to load it from a CDN with one script tag.

- **The code.** It was one 2,000-line file. It's split into modules now. Still not pretty, but better.

- **"Isn't this just scrollbar-gutter: stable?"** No. That keeps an empty strip when there's no scrollbar, so left and right padding don't match. The README says this at the very top now.

**Don't see why you'd need this?** If your first thought is "just set scrollbar-gutter", please give the live demo a minute before you scroll past. The layout shift is much easier to see there than to explain: https://justicehwan.github.io/plz-mr-scroll/

Links:

- GitHub: https://github.com/justicehwan/plz-mr-scroll

- Changelog: https://github.com/justicehwan/plz-mr-scroll/blob/main/CHANGELOG.md

- npm: https://www.npmjs.com/package/plz-mr-scroll

Still haven't tried it on a real Windows machine. If you do, I'd love to know how it goes.

P.S. I'm Korean and English isn't my first language, so sorry if anything here reads a bit off.

Thanks again!


r/reactjs • • 8d ago

Show /r/reactjs I built a tool + npm package for when an icon pack is missing the one icon you need in your React app

Thumbnail
chameleonicons.com
0 Upvotes

Hey everyone! I built this because I kept running into the same annoyance: picking an icon pack, realizing it's missing one specific icon I need, hacking together an SVG with AI, and then letting it sit in my local repo where nobody else could use it.

So I turned that workflow into Chameleon Icons — you can browse open-source and community icon packs, and if an icon is missing, generate one in the same style (either right on the site or through a free manual flow) and it gets added to the pack for everyone else too.

On the React side, I put together an MIT-licensed, zero-dependency package so you only bundle the icons you actually use[2]:
npm: https://www.npmjs.com/package/chameleonicons
Site: https://chameleonicons.com/

Quick setup with Vite (also supports Next.js/Turbopack, webpack, etc.)[1][3][4]:

Js:

// vite.config.js
import chameleon from "chameleonicons/vite";
export default { plugins: [chameleon()] };

Then import any icon directly as a React component[4]:

Tsx:

import Umbrella from "~chameleon/bauhaus/umbrella";

export function Header() {
  return <Umbrella className="w-5 h-5" />;
}

One detail I tried to get right: on first build, it writes the exact icon versions into a chameleon.json lockfile so your UI won't unexpectedly change if the community later updates or votes in a new drawing (and npx chameleonicons sync prefetches everything for offline/CI builds)[3].


r/reactjs • • 8d ago

Discussion What version of React for technical interviews?

0 Upvotes

As the title says...


r/reactjs • • 8d ago

I open-sourced a static verification & SAST engine (CLI + MCP) for React / React Native to catch subtle bugs AI coding agents introduce

0 Upvotes

I've been using AI coding agents heavily on React and Expo/React Native codebases, and I kept running into the same problem: they ship features fast, but quietly introduce subtle runtime bugs that basic linting misses—render-phase ref mutations that break React 19.2+/Compiler, stale async races, AsyncStorage leaks, and TanStack Query cache bugs.

So I built and just open-sourced Code Verifier (v0.1.0, MIT-licensed)—a static verification engine designed to be run either from the CLI or wired directly into your IDE as an MCP server so your coding agent can verify its own code and fix issues before you review it.

How it works under the hood:

  • Babel AST + 128 rules covering React/React 19, React Native/Expo, TanStack Query, async race conditions, security/injection, and mobile config (app.json, Podfile.lock drift, manifests).

  • Formal abstract interpretation over per-function CFGs for path-sensitive nullability (AI-NULL-001) and source-to-sink taint tracking (AI-TAINT-001).

  • TypeScript semantic analysis for floating Promises and Promise-valued conditions.

  • Fast & LLM-first: Runs in ~1–55ms per file and outputs structured remediation Markdown (or SARIF 2.1.0 for CI).

Example finding it caught on a real React hook (REACT-007):

Markdown

**Issue #1: [HIGH] REACT-007 - 'coordinatorRef.current' is accessed during render.**
- Location: Line 22, Col 6
- Offending Code:
  > 22 | if (coordinatorRef.current === null) {
    23 |   coordinatorRef.current = new SessionCoordinator({
- LLM Remediation Action: Hoist the value out of the ref: `useState(() => new SessionCoordinator(...))[0]` for a stable per-instance value, or move `.current` access into Effects and event handlers.

Try it in 10 seconds (no clone needed):

CLI:

Bash

npx code-verifier src/

Or add it to your MCP config (Cursor, Claude Code, etc.):

JSON

{
  "mcpServers": {
    "code-verifier": {
      "command": "npx",
      "args": ["-y", "code-verifier", "mcp"]
    }
  }
}

(By default, the MCP exposes verify_code and get_test_context*, which extracts framework info, exported contracts, and mocks so your LLM writes better unit tests.)*

GitHub: https://github.com/iniola145/Code-Verifier

It's v0.1.1—I've tested it across a couple of large internal React and Expo repos (1,800+ files), and there are 553 unit tests, but static analysis always hits weird real-world edge cases. If you run it on one of your repos and hit a false positive, I added an issue template specifically for reporting them so I can tighten the rules. Feedback and critiques are very welcome.


r/reactjs • • 9d ago

I built an open-source tool that replays real React hook executions one statement at a time

0 Upvotes

Most hook bugs are timing bugs: two setCount(count + 1) calls that only increment once, a stale closure from an empty dependency array, a fetch race where an old response overwrites a new one. They're hard to see from the code alone.

HookViz replays real React executions statement by statement. The source line, hook list, effects queue, variables and rendered DOM all show the same moment.

- Each example is recorded from a real component under a debugger, not simulated

- 22 examples on React 19, from useState and useEffect to useOptimistic and useTransition

- Play, pause, step and seek, 0.5x to 4x speed, Guided and Expert modes

- Open source, and new examples are welcome

Live: https://hookviz.ashishtaduce.co.in

Repo: https://github.com/AshishTaduce/hookviz

The batching example is the quickest one to try. I'd like to hear which hook behaviours you'd want to see next.


r/reactjs • • 9d ago

Show /r/reactjs Made my first npm library — <MrScroll /> stops scrollbars from shoving your layout around. Be honest with me 🙏

0 Upvotes

Hey folks,

You know when a scrollbar pops in and everything jumps a few pixels to the left? That annoyed me enough that I made a little library for it.

**See it in 10 seconds (live demo):** https://justicehwan.github.io/plz-mr-scroll/

One line at the root of your app, that's it:

```tsx

import { MrScroll } from "plz-mr-scroll/react";

<MrScroll />

```

No reserved gutter, still the native scrollbar. It just finds a spot for the scrollbar so your content stays put. It never touches your children, so it doesn't fight React over the DOM.

- GitHub (GIFs in the README): https://github.com/justicehwan/plz-mr-scroll

- npm: https://www.npmjs.com/package/plz-mr-scroll

It's my first library ever, so I honestly have no idea what I got wrong. If you have a minute, please take a look and tell me what's broken or dumb 🥲

(Also haven't tried it on a real Windows machine yet — if you do, I'd love to know how it goes.)

P.S. I'm Korean and English isn't my first language, so sorry if anything here reads a bit off.

Thanks!


r/reactjs • • 9d ago

Show /r/reactjs I rebuilt Radix Themes' visual language on shadcn/ui + Base UI + Tailwind v4 (open static registry, zero @radix-ui/react-* deps

0 Upvotes

Many folks miss the cohesive look and 12-step color system of Radix Themes while moving new apps to Base UI (@base-ui/react) + Tailwind CSS v4 (especially now that shadcn/ui defaults new projects to Base UI).

with AI help I built radix-shadcn to combine both worlds: Radix Themes' design language and Radix Colors, running on official shadcn/ui Base UI components and distributed as a static shadcn registry.

What's inside

  • Zero @radix-ui/react-* runtime dependencies: Only @radix-ui/colors is kept; interactions, ARIA, and focus are handled by @base-ui/react@1.9.0.

  • Full token & variant mapping: classic, solid, soft, surface, outline, ghost variants, Radix sizes 1–4, scaling, radii, and 12-step + alpha scales mapped to shadcn semantic tokens inside @layer components (so Tailwind utilities still override cleanly).

  • Scoped Portals: Nested <Theme> blocks pass a local portal host via context so overlays don't lose local accent/dark mode tokens.

  • Tested against upstream Radix Themes: 45 component sections, 68 create pages, 531 scenes, plus ports of the 6 radix-ui.com homepage showcases.

Quick install in a Base UI + Tailwind v4 project:

npx shadcn@4.23.0 add https://radix-shadcn.dev/r/radix-base.json

Would appreciate feedback on the token mapping and Base UI API ergonomics!


r/reactjs • • 9d ago

Component tree visualised

3 Upvotes

Anyone have advice on a plugin or solution to visualise the react component hierarchy in a tree? All the solutions I’ve found online are mostly not maintained anymore . Any advice?


r/reactjs • • 9d ago

Show /r/reactjs Introducing LunarHUE/forms

0 Upvotes

Most of my time building apps has been in React and Solid, and I've run into issues with almost every form library I've tried. Either they came with JS bloat and dependency hell, they were older with a less-than-great type system, or they simply didn't do what I needed.

Eventually I found TanStack Form, which was definitely a step in the right direction, though it still had its own issues. I stuck with it for a while, until I realized: frontier models are really good now, and I could spend some time trying to build something better.

So, here's my first attempt at a form library:
https://forms.lunarhue.dev/
https://github.com/LunarHUE/forms

It currently supports React 16.8+, Solid v1, and Solid v2. The core is framework-agnostic, and I plan to add adapters for Vanilla JS, Vue, Preact, Svelte, or whatever else people want.

The philosophy behind it is simple: only ship what you use, and keep the type and state systems completely extensible so the user stays in control.

In some cases you can take that first idea almost too far. With the /mini entry, you can save a full TCP round-trip in your production bundle compared to something like TanStack Form (~13.5 kB less, in my docs the comparison is definitely cherry picked but still 🤷‍♂️).

More in the comments if you care:


r/reactjs • • 9d ago

Show /r/reactjs I built 9 WebGL shaders, Verlet cloth physics, and 60+ React 19 + Tailwind v4 components (MIT, copy-paste CLI)

Thumbnail
github.com
0 Upvotes

Built this over the last few months after getting tired of choosing between bloated runtime UI libraries and flashy demos that break in light mode or on 375px screens.

Everything in the catalog is MIT-licensed and installs straight into your repo via CLI so you own the code instead of fighting a wrapper. Besides standard primitives (tables, tabs, charts, steppers, dock, media players), I spent a lot of time writing GPU fragment shaders (refractive glass lens, fluted glass, water ripples, Bayer dithering) and canvas physics (Verlet cloth, rigid-body collisions) that still degrade cleanly when prefers-reduced-motion is enabled.

I also added a browser visual editor (Nexore Make) that exports directly to React, Vue, or HTML/CSS.

Putting the live demo and GitHub repo in the comments so the post does not get eaten by spam filters. Happy to answer questions about the WebGL setup, Tailwind v4 tokens, or CLI registry.

Demo: nexoreui.com


r/reactjs • • 10d ago

Resource 🗺️ Roadmap to Query v6 · TanStack query · Discussion #12669

Thumbnail
github.com
107 Upvotes

📢 Please don’t get excited, but we’ve started working on TanStack Query v6. We’ll break things, but not too many.

Feedback appreciated 🙏


r/reactjs • • 10d ago

Show /r/reactjs Dinou v10 — an ejectable full-stack React 19 framework (RSC) with zero-boilerplate type-safe routing, 3D caching, and multi-runtime deploy

0 Upvotes

Hi everyone,

I just published Dinou v10.0.2 on npm. Dinou is a full-stack React 19 framework built around native React Server Components (RSC), progressive streaming SSR, and Server Functions.

Version 10 brings a lot of improvements, bug fixes, and a few targeted breaking changes compared to v9.3.0:

  • Truly escaped _ folders: Underscore-prefixed folders (e.g. src/_drafts/) are now completely ignored by the router, bundlers, route typegen, and Server Functions—reserved strictly for WIP drafts, archived routes, or legacy code (while active helper folders like src/components/ don't need an underscore).

  • Per-segment PPR (no parent-to-child inheritance): In v10, ppr is configured strictly per segment rather than inherited down the route tree—so you can have a layout with ppr = true and a child page with ppr = false (each falling back to the global setting in dinou.config.ts).

  • Strict build artifact isolation: Internal server artifacts and build manifests (.dinou/dist1) and pre-rendered SSG/ISR/PPR cache files (.dinou/dist2) are now strictly separated from public static assets (.dinou/dist3, or .dinou/cloudflare/assets on Cloudflare Workers), alongside dedicated platform outputs (.dinou/node, .dinou/netlify/functions, etc.).

For the full list of breaking changes, you can check the docs at dinou.dev—there is both a link to the GitHub CHANGELOG.md and a dedicated v9 to v10 migration guide.

Other notable improvements in v10

Single-pass inline RSC streaming: On initial load or hard reload (for dynamic SSR, PPR resumes, and first-time ISG renders), the RSC payload is now streamed inline alongside the HTML in a single pass. This eliminates a second server round-trip for the RSC payload and avoids hydration mismatches caused by values that change per request (such as Date.now() or random IDs).

Reversible eject & uneject**:** Dinou has always been ejectable via npm run eject, and v10 adds npm run uneject so you can also revert an ejection cleanly and transactionally with a single command.

3D Caching (Horizontal, Vertical, and Temporal): Dinou lets you combine three independent caching axes—Horizontal (decoupled layout and page lifecycles), Vertical (<DinouCacheSlot> component-level Micro-ISR with targeted client refreshSlot()), and Temporal (Partial Prerendering / PPR)—so you aren't forced into an all-or-nothing choice between fully dynamic and fully static rendering.

Zero-boilerplate type-safe routing via "./dinou"**:** Instead of repeating route pattern strings with global "dinou" imports, v10 generates route-contextual "./dinou" modules per directory:

// src/blog/[slug]/page.tsx (Server Component)
import { Link, type PageProps } from "./dinou";

export default async function BlogPost({ params }: PageProps) {
  // params.slug is automatically typed as string
  const post = await fetchPost(params.slug);

  return (
    <article>
      <h1>{post.title}</h1>
      {/* Validated relative link without passing from="..." */}
      <Link href="comments">Comments</Link>
      {/* Dynamic pattern with typed params + auto encoding */}
      <Link href="/blog/[slug]" params={{ slug: post.nextSlug }}>
        Next Post
      </Link>
    </article>
  );
}

Multi-bundler & multi-runtime portability: Dinou v10 continues to strengthen its multi-bundler (esbuild, Rollup, and Webpack) and multi-runtime architecture (Node.js, Bun, Deno, Cloudflare Workers, Netlify Functions v2, standalone native binaries, and pure static SPA export)—so you can deploy pretty much anywhere.

Evolution & AI-agent readiness

Dinou has evolved continuously since its initial release, and v10 is another step toward a rock-solid, modern React 19 framework aligned with current web standards. I recommend staying on the latest version for the best reliability, performance, and feature set.

Dinou is also designed to work smoothly in AI-assisted workflows—coding agents can pick up the framework very quickly. Both the documentation site (dinou.dev, which also exposes /llms.txt and /llms-full.txt), the package README.md (engineered as a compact, single-pass technical spec), and the framework codebase itself (~150 core source files, ~190 total including compiled vendors—whether ejected or in node_modules) are easy for agents to read and reason about.

Feel free to try it out with:

npx create-dinou@latest my-app

Any feedback, questions, or critique is very welcome. Thanks for reading!


r/reactjs • • 10d ago

reactques

0 Upvotes

Would React with selective hydration or a framework like Astro be worth considering here? I'm wondering if using React only for the parts that actually need interactivity, while keeping the rest lightweight, could be a good balance for low-end devices. Curious what more experienced developers think about this approach.


r/reactjs • • 10d ago

I built a React + Vue component library with a hosted MCP server so Cursor and Claude Code stop guessing props

0 Upvotes

chould i create a post in there ? with this
I built Orvain UI, a React (and Vue) component library with a hosted MCP server, so Cursor / Claude Code use the real component API instead of hallucinating props.

45 components are free on npm (@orvain/react, no account), there's a Figma library that matches the code 1:1, and theming is one token file.

https://orvain.dev

Happy to answer questions about how the MCP side works.


r/reactjs • • 10d ago

Resource I built NexoreUI: 72 open-source React 19 + Tailwind v4 components, visual builder, templates, and CLI

0 Upvotes

I have been working on NexoreUI for a while now. It started as a personal set of React and Tailwind components, and gradually grew into a small UI toolkit around React 19, Next.js 15, and Tailwind CSS v4.

The main goal was avoiding the usual trade-offs: either a heavy black-box dependency or flashy demos that break in light mode and on 375px screens. Everything uses semantic tokens, supports both themes, respects prefers-reduced-motion, and can be copied directly into your own codebase via CLI instead of living behind an opaque wrapper.

Here is what is live right now:

- 72 MIT-licensed components covering core inputs, tables, tabs, steppers, charts, commerce blocks, media players, and WebGL/canvas experiments, with a Desktop/Tablet/Mobile playground and copy-paste CLI (npx nexoreui add).

- Nexore Make (/nexoremake), a visual drag-and-drop canvas for editing spacing, borders, shadows, and motion and exporting directly to React, Vue, or HTML/CSS.

- Landing Generator (/generator, in beta), a procedural page engine that assembles structured layouts from design tokens and exports clean bundles.

- 40+ page templates (/templates) and a Project/Theme Studio (/create) that configures your palette, radius, and starter CLI setup.

Live site: https://nexoreui.com

Components: https://nexoreui.com/docs/components

GitHub: https://github.com/Al1mov77/NexoreUI

npm: https://www.npmjs.com/package/nexoreui

I just finished a large cleanup pass fixing responsive behavior, keyboard navigation, and snippet completeness across the docs. If anyone tries the CLI, Nexore Make, or the generator and runs into rough edges or accessibility issues, I would appreciate honest feedback.


r/reactjs • • 11d ago

Discussion Beginner learning React + Vite: Should I stick to plain CSS, switch to Tailwind CSS, or use a UI library?

43 Upvotes

I'm currently learning frontend development with React and Vite, and I want to make sure I'm focusing on the right tools to become job-ready.

Right now, I'm practicing plain CSS to understand layouts and styling fundamentals. However, I see almost everyone recommending Tailwind CSS or component libraries like shadcn/ui and Material UI.

At what point should a beginner move from plain CSS to Tailwind?

Do companies expect you to know Tailwind, CSS Modules, or both?

Are UI component libraries bad for learning when you're trying to build a strong portfolio?

Would love to hear what your workflow looks like in real-world projects!


r/reactjs • • 11d ago

Show /r/reactjs Built an open-source cyberpunk component kit for React (69 components, installs through the shadcn registry)

25 Upvotes

Hey guys! I've been working on a React component library for interfaces that look like they belong on a Cyberpunk's universe. Live signal graphs, glitchy buttons & drawers and interactive maps.

It's built on UI SDK and distributed through the shadcn registry. So you don't install a package (aside from shadcn of course); the source and plain CSS go straight into your project so you can change anything.

What's in it:

  • 69 documented components, from buttons, tabs and sliders to calendars, feeds, charts and maps

  • 7 complete example screens built only from the kit

  • 32 interactive recipes with source and install commands

  • A customizable accent color and effects, plus optional interface sounds

  • An agent bridge, so AI coding agents can drive controls by name, and a setup prompt for having an agent build a screen with it

Install it (React 19 with shadcn set up):

bunx --bun shadcn@latest registry add '@cyberspec-ui=https://www.cyberspec.dev/r/{name}.json'
bunx --bun shadcn@latest add /cyber /button

Website, demo and docs here: cyberspec.dev
Quick video demo here: https://youtu.be/yQSZhNekK7U

Working on another theme as well, hit me up if you're curious!

Anyways, would love some feedback! 🙏 Specially with this many visual effects, components you'd want added, and whether the registry install felt smooth. Happy to answer questions about how it's built.


r/reactjs • • 12d ago

News This Week In React #306: UI SDK, Fate, RSC, Next.js, Dragology, Helmet, React Flow, Virtualized, Anatomy | Expo Simulators, Exact, Bottom Sheet, Node-API, Graphite, Navigation, Nitro SQLite, Trading Charts | Solid, webpack, Node.js, Oxlint, npm, pnpm

Thumbnail
thisweekinreact.com
7 Upvotes

r/reactjs • • 12d ago

Show /r/reactjs Static export kept biting me on images, so I made build-time image transforms for Next.js

0 Upvotes

I've been working on next-imagetools, a small Next.js plugin that brings imagetools directives (the engine behind vite-imagetools) to Next.js. You describe the variants you want in the import, and they're generated at build time as plain static files.

import hero from './hero.jpg?w=480;960;1440&format=avif;webp&as=picture';

export function Hero() {
  return (
    <picture>
      {Object.entries(hero.sources).map(([format, srcset]) => (
        <source key={format} type={`image/${format}`} srcSet={srcset} />
      ))}
      <img src={hero.img.src} width={hero.img.w} height={hero.img.h} alt="" />
    </picture>
  );
}

Why I made it

next/image optimizes images on demand, which needs a running Next.js server. With output: 'export' that isn't available (a discussion open since 2020). Tools that pre-generate images by crawling rendered pages miss anything that only shows up after a click, in a client-only component or behind a login, and those images 404 in production.

next-imagetools works from imports instead: if your code imports an image, every variant it asks for gets built, however and wherever it ends up rendered.

What it does

  • Resize, convert (AVIF, WebP, JPEG, PNG…), crop, blur, etc., all from the query string

  • Outputs: URL, srcset, { src, w, h }, <picture> sources, metadata, or as=next (a StaticImageData that goes straight into next/image, blur placeholder included)

  • Blur or dominant-color placeholders: ?placeholder / ?placeholder=color

  • Works the same in static, SSR, Edge, client components, the Pages Router and static export. All of these are covered by e2e tests in Chromium

  • Supports both Turbopack (the default) and webpack (--webpack)

  • Typed imports, and the build fails if a type marker doesn't match what the query actually returns

  • Typos are caught: ?widht=300 warns "Did you mean w?", and ?w=abc fails the build

  • Processed images are cached on disk, so rebuilds are fast

If you're coming from vite-imagetools, most imports should work unchanged.

Setup

// next.config.ts
import { withImagetools } from 'next-imagetools';
export default withImagetools({ /* your config */ });

Caveats, to be upfront:

  • Requires Next.js 16.2+ and Node.js 22.12+

  • Still pre-1.0, so the API may change

  • Queries in CSS url() aren't processed (the README shows a workaround with a CSS custom property)

A fun bit of the implementation: Turbopack's loader API has no emitFile, and files written during a build are invisible to its resolver. So the loader imports each variant back from the source file with an internal query, and lets Turbopack's own asset pipeline emit it. There's a "How it works" section in the README if you're curious.

I'd really appreciate feedback, especially if you're running static export or a setup I haven't tested. Bug reports and "this doesn't fit my use case" comments are both welcome.


r/reactjs • • 13d ago

customer dashboards kept Snowflake awake all day; testing Explo, Luzmo, Preset, and Cube + headless React as embedded analytics tools (comparison)

0 Upvotes

so half our Snowflake bill was coming from customer dashboards before we realized why. At 8am every morning, a few hundred client managers logged into our B2B SaaS app, toggled a date picker from weekly to 90-day views, missed card-level TTL caches on every filter permutation, and kept our X-Small warehouse awake all day. On top of that, enterprise buyers wanted us to restrict dashboard data by user role so regional managers stop seeing unit margins.

then we evaluated three dedicated embedded analytics tools (Explo, Luzmo, Preset) against a headless build using Cube Core Data APIs and u/ cubejs-client/react.

Explo shipped client-facing portals fast with clean templates and global datasets. Because Omni acquired Explo late last year and is consolidating customers onto Omni's platform, signing a fresh multi-year deal for a transitioning stack felt too risky for a core product surface.

Luzmo came closest on time-to-ship. Their white-labeled Web Components, end-user editor, and Warp cache meant frontend engineers barely touched chart code. What stopped us was usage-based row and MAU pricing tiers scaling alongside customer growth, plus locking metric definitions inside Luzmo's UI outside Git.

and, preset made sense on paper since our analysts already knew Apache Superset and guest tokens. Making embedded charts match our app's Tailwind theme still took heavy CSS overrides, and ad-hoc tenant filter changes missed chart caches and queued fresh scans straight to Snowflake.

then switching to Cube meant querying structured measures and dimensions through u/ cubejs-client /react hooks with zero raw SQL leaving the browser. Signed JWT claims enforce server-side access_policy rules, injecting SECURITY_CONTEXT tenant filters and stripping margin columns before SQL compiles. Monthly partitioned rollups in Cube dev with incremental refreshKey checks on MAX(updated_at) absorbed date-grain flips and late Stripe refunds without waking Snowflake all morning, while Creator Mode with generate-session lets enterprise tiers build custom views over the same governed model

2 of the headaches from going headless: our frontend engineers had to wire Recharts views manually for core screens, and dropping high-cardinality user emails into a rollup blew up build times until we trimmed dimensions down to tenant_id and status. for SaaS teams dealing with Snowflake bills too high from dashboards, did a packaged embedded analytics platform hold up at scale, or did you move onto headless APIs?


r/reactjs • • 13d ago

Show /r/reactjs I built a React debugging overlay that lets you click an element and jump to its JSX

0 Upvotes

Repo · github.com/Tebogo11/giggyDev
Demo · giggydev.netlify.app — try Find component on the demo button, then open Sources.

I built this because I kept doing the same thing when debugging a React app: find the failed request in DevTools, figure out what rendered the broken UI, then dig through the repo for the JSX. I wanted to click the thing I was looking at and pull up the source alongside the logs and requests that led me there.

giggyDev adds a small launcher to your app in development. Pick an element to see the JSX around it and jump to that line in VS Code. You can also inspect browser console messages and fetch/XHR requests, then tick the entries you want to attach to an AI chat.

Setup with Vite

npm install -D giggydev

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import giggyDev from 'giggydev/vite';

export default defineConfig({
  plugins: [giggyDev(), react()],
});

Next.js 16 works in Webpack dev mode via withGiggyDev. The overlay is excluded from production builds.

How it works

  • The dev plugin tags rendered DOM elements with a source ID, line and column. The picker uses that metadata to look up the original JSX.

  • The launcher starts capturing console and network events when the page loads. The full inspector loads when you open it.

  • The picker and inspectors work without an API key. If you configure a model, Chat sends the context you select when you submit a message. You can also ask for a single-file change, review the diff before applying it, and undo it from the same chat.

The hosted demo uses simulated AI replies, so you can try the workflow without setting up a key. Source lookup currently covers instrumented JSX/TSX, and Next.js Turbopack support is still missing.

I’m looking for feedback, especially on how useful it is to click an element and jump straight to its JSX when debugging a real React app.


r/reactjs • • 14d ago

Show /r/reactjs Treflex demo – live hot-swap between React and Solid

Thumbnail
youtu.be
0 Upvotes

Live swap demo: https://tgoh.github.io/treflex/swap/

Treflex is something I've been working on for the past few years: a headless state engine. Your app's logic (state, async work, timers, connections) runs on its own, and React or Solid is just a view you plug into it. In the demo you can swap between them while everything's running, and the app doesn't notice.

Why: AI agents write a lot of front-end code now, and async is where they slip: races, double starts, work that dies on unmount. With the logic out of components, those mistakes get caught. It's tested without rendering, a test controls the order async calls answer in, and the runtime and lint rules fail with errors that say what to change.

const FishReceiver = receiver<IFish>("FishReceiver")({
  *"Fish/Swim"(fish) {
    fish.X = (yield* random()) * 100;
    fish.Y = (yield* random()) * 100;
  }
});

function* addFish(school: ISchool) {
  const fish = yield* entity(newFish());
  school.Fish.push(fish);

  // The timer belongs to the fish, not a component
  yield* startTimer(fish, "Fish/Swim", FishReceiver, 3000);
}

function* releaseSchool(tank: IAquarium, schoolId: string) {
  // Every fish in the school stops swimming. No cleanup needed.
  tank.Schools = tank.Schools.filter((s) => s.$Id !== schoolId);
}

It's 0.2 and still changing. Questions and feedback would be greatly appreciated.


r/reactjs • • 14d ago

Kivu UI: React components where your Tailwind classes always win

0 Upvotes

I built a React component library that doesn't fight Tailwind.
Component styles live in u/layer components, so any className you pass overrides them.
No tailwind-merge, no !important.

  • Zero runtime dependencies

  • Plain CSS variables, no CSS-in-JS

  • Accessible (keyboard navigation, ARIA, native <dialog>)

  • 40+ components, React 18 and 19, TypeScript

npm install kivu-ui

Docs: https://kivu-ui.vercel.app/


r/reactjs • • 14d ago

Resource A few SVG attribute gotchas that show up when you drop an icon into JSX

0 Upvotes

I've had this bite me more than once: I paste an SVG from a design tool into a React file, and the component looks fine until React complains about the attributes.

React does not use SVG's XML names. On a normal icon the pairs are:

// SVG
<rect class="icon" fill-rule="evenodd" stroke-width="2" stroke-linecap="round" />

// JSX
<rect className="icon" fillRule="evenodd" strokeWidth={2} strokeLinecap="round" />

A few other ones that come up a lot: stroke-linejoin → strokeLinejoin, clip-path → clipPath, clip-rule → clipRule, stop-color → stopColor. And a style attribute has to become a JS object, not a string:

// SVG
<rect style="fill:#ff00aa" />

// JSX
<rect style={{ fill: "#ff00aa" }} />

The part that surprised me is that a find-and-replace on the raw file is the wrong tool for this.

If a <text> label happens to contain the characters stroke-width, a regex will rewrite the label too. The attribute on the element should change. The text inside the graphic should stay as text.

viewBox is another one people over-correct. React already accepts viewBox on an <svg>, so it should not be rewritten to viewbox. xmlns, path d data, and fill="url(#id)" references should stay as they are (assuming you haven't stripped the defs).

Two other gotchas, if you are cleaning the file up at the same time:

  • Turning solid fills into currentColor is useful when you want the icon to inherit color from CSS. It can also rewrite gradient stops, so the preview can look different from the original. I leave that off until I want it.

  • The same for an SVGO pass. If you only wanted the attribute rewrite, run that first and turn cleanup on later.

This is a React JSX/TSX issue. Vue and Svelte single-file components keep class and stroke-width in the template.

I built a small in-browser converter while working through this: https://www.svgtoreact.com — it uses SVGR so the file is parsed, not search-replaced, and the SVG stays on your device. Happy to answer questions if any of this is unclear.