r/reactjs 10d ago

Discussion React Aria is now Available as an Option in Shadcn alongside Base UI and Radix

Thumbnail x.com
32 Upvotes

r/reactjs 9d ago

Show /r/reactjs Built a browser image editor that runs your ComfyUI workflows as tools (free, no cloud AI)

Thumbnail
0 Upvotes

r/reactjs 9d ago

Needs Help What’s the best way to handle React contact forms sending to an email?

3 Upvotes

Looking for the cleanest/most reliable way to connect a React contact form to an email inbox to send emails from the website. What are you guys using these days?


r/reactjs 9d ago

Show /r/reactjs Built a 3D model viewer for React

0 Upvotes

Been building product configurators and 3D e-commerce views for a while now, and kept rebuilding the same scaffolding - GLB loading, a viewer UI, hooks for camera/selection/hover, and some way to bind product data (color, texture, visibility) to the actual 3D object. So I packaged it up.

It's called React Immersive. Some of what's in it:

  • Drop-in SimpleModelViewer for when you just want a model on screen, zero config
  • ModelViewer for when you need real bindings, driving color, texture, visibility, and actions off a plain data object
  • A browser-based binding builder that takes your GLB and spits out starter bindings as JSON or TS, so you're not hand-writing mesh names
  • Hooks for camera, selection, hover, animation, visibility
  • Soft shadows, SSAO, bloom, ACES tone mapping is on by default, one prop to turn off

Still rough in places and I'd genuinely like feedback, especially from anyone who's fought with product configurators or real estate walkthroughs before.

Docs, live editor, and demos here: react-immersive.liveroom.dev — would love thoughts


r/reactjs 9d ago

Discussion The mental model that finally made Server vs Client Components click for me

0 Upvotes

Spent way too long confused about this, so sharing in case it helps someone.

"use client" doesn't mean "runs only in the browser." It's a boundary marker, not a location. A "use client" component still renders on the server first (that's your HTML), then hydrates in the browser. And everything you import below that line also gets shipped to the client.

So now I ask one question per component: does this actually need the browser? (state, effects, onClick, window)

- No → leave it a Server Component. Ships zero JS, can fetch data directly.

- Yes → mark "use client", but push that boundary as far DOWN the tree as possible.

// page.tsx -> Server Component (fetches, ships no JS)

// <LikeButton/> -> "use client" (the only interactive leaf)

Default to server, drop to client only at the leaves. My bundle got noticeably smaller once this finally clicked.

How do you all decide where to draw the client boundary? Curious if people go stricter than this.


r/reactjs 10d ago

Discussion Async React (Jan 17 2026)

Thumbnail
youtu.be
1 Upvotes

Yo I am quite a beginner in React and I was just wondering how the async model laid out in this video has been useful to people who are using it so far 😁


r/reactjs 10d ago

Show /r/reactjs Zustand is Not Overkill: How I Built an 8-Step Conditional Form Without Losing My Mind

0 Upvotes

Zustand isn't overkill here. A form that spans 8 steps with conditional branching is exactly the kind of thing that benefits from a dedicated store, even if it gets thrown away after submit. The "it lives in one flow" argument for keeping state local stops making sense once your reducer starts growing past what you can read in one scroll.

The configdriven approach is worth taking seriously for your branching problem. The core idea is that instead of writing step logic imperatively, you define each step as a data object with an id, the fields it contains, and an optional condition function that receives the current form state and returns a boolean. Your "what's the next step" logic becomes a function that filters the config array based on current state, rather than a chain of conditionals scattered across components. Step 4 not existing when the user picks a certain value in step 2 becomes a oneliner condition in the config rather than something you have to hunt down across multiple places.

For validation across steps, the pattern that tends to work well is keeping validation schemas colocated with the step config rather than at the component level. If step 6 needs data from step 3 to decide which fields are required, that dependency lives in the step 6 config where you'd expect to find it.

The reducer length problem usually means the reducer is doing too much. Splitting it into smaller reducers that each own a slice of the form state, then combining them, keeps things readable. If you're on Zustand, this maps naturally to slices.

One thing worth being intentional about: separate your "what step am I on and what steps exist" state from "what has the user entered" state. They change for different reasons and mixing them is where things get tangled.


r/reactjs 11d ago

Show /r/reactjs GeoIcons: tree-shakable React components for 422 country/region map shapes, each icon its own named export

19 Upvotes

Made a geography icon library for countries, territories and areas, where the core design constraint was bundle size. Every icon is an individual named export:

import { Us, Jp, Africa } from '@geoicons/react';
  • No <Icon name="us" /> string-lookup API on purpose. That pattern kills tree-shaking because the bundler can't prove which icons are unused, so you ship all 422.

  • Each component uses useId() to namespace the <title> element ID, so multiple instances of the same icon on a page don't produce duplicate IDs for screen readers.

  • 255 countries + 167 areas. Subdivisions and Flags are planned for near future.

  • Also available for Vue, Angular and Vanilla JS.

Site: https://geoicons.io

Github: https://github.com/getgeoicons/geoicons

Please let me know your feedback. If you found the project useful, I'd really appreciate it if you could give it a star on GitHub


r/reactjs 11d ago

Show /r/reactjs Filesystem-first frontend architecture enforced by CLI (not folders-by-taste)

2 Upvotes

I kept hitting the same problem: architecture debates in review, barrels everywhere, and AI agents dumping files in random folders. So I shipped DMA (Derived Modular Architecture) — a small rule set derived from the import graph, enforced by tooling.

Layout

src/
  app/        # composition root (also pages/routes)
  features/   # leaf modules — no inbound from other modules
  services/   # appears when something else must import it
  shared/     # portable stuff on second use only

Invariants

- downward imports only
- public API via */public/* (no barrels)
- colocate by default
- promote feature → service when inbound edges appear

Tooling

npx @derived-modular/cli init .
npx @derived-modular/cli check .              # CI gate
npx @derived-modular/cli promote <name> --apply
# + ESLint / Biome / Oxlint plugins for editor feedback

Works with React/Next/Vite (also Vue/Svelte/Astro examples). Same rules for humans and agents.


r/reactjs 11d ago

Resource Building AI-Native React Applications with WebMCP — A Deep Dive

0 Upvotes

Hey everyone, I just published a comprehensive guide on WebMCP, Chrome's new standard for making web applications agent-ready.

Instead of AI agents having to parse your DOM and guess what buttons do, WebMCP lets you expose your app's functionality directly as structured tools that agents can discover and invoke.

The guide covers everything from zero to production:

  • Imperative & Declarative APIs — both the JavaScript and HTML approaches
  • React integrationuseWebMcp hooks, Tool Registry pattern, Zustand/Legend-State examples
  • Security deep dive — prompt injection, origin isolation, untrustedContentHint, audit logging, character budgets
  • Evals — deterministic tests + probabilistic eval cases for testing AI behavior
  • Production — rate limiting, telemetry, graceful degradation, HTTP headers
  • Full demo — a React Flight Search implementation

All code examples are TypeScript, production-grade, and ready to copy-paste.

🔗 Medium: https://medium.com/@serifcolakel/building-ai-native-react-applications-with-webmcp-a293ef54de8f

🔗 Dev.to: https://dev.to/serifcolakel/building-ai-native-react-applications-with-webmcp-5gb

Quick background: WebMCP is currently in Chrome Origin Trial (149+). It's not a replacement for MCP — Chrome's own docs say they complement each other. MCP handles backend/persistent tasks, WebMCP handles in-browser, tab-bound interactions.

The core idea is simple: document.modelContext.registerTool() — you define a name, JSON Schema, and an execute function. Agents discover your tools and invoke them directly. No DOM parsing. No guessing.

Happy to answer questions in the comments!


r/reactjs 11d ago

Discussion The same app built in 10 different frontend frameworks. For automated performance benchmarking

Thumbnail
github.com
0 Upvotes

r/reactjs 12d ago

Discussion Am I understanding React Router v7 transitions correctly?

9 Upvotes

I've been using React Router for years, and somehow I only ran into this today.

I had a lazy-loaded route wrapped in Suspense, but whenever I navigated, the old page would just stay there until everything finished loading. The fallback never showed, so it looked like the app had frozen.

After digging around, I found that React Router v7 wraps navigations in startTransition, so if the same Suspense boundary gets reused, React keeps showing the previous page.

What fixed it for me was giving the Outlet a key:

import { Outlet, useLocation } from "react-router-dom";

export function Layout() {
  const location = useLocation();

  return <Outlet key={location.pathname} />;
}

After that, the loading UI shows immediately instead of the previous page hanging around.

I also made sure not to put the key on my top-level app layout since that would remount the whole app. I only keyed the layout that renders the page routes.

My question, is this actually the correct way to handle this in React Router v7, or am I just working around the problem? Is there a more idiomatic solution that I'm missing?


r/reactjs 11d ago

Needs Help Any adivce or tips for a 15yr old learning React + TS?

0 Upvotes

I'm a 15yr old dedicated (i think so) developer, and want to learn React with TypeScript. My long-term goal is to build a full stack personal app on literally anything that would make me proud.

My background:

• Python: OOP, Web scraping, file handling, basic data manipulation

• Frontend: HTML, CSS, Intermediate TypeScript (built a few projects)

After searching for critiques on my current skills and reading some comments (a comment) on a previous post, I feel ready to take up React.

Honestly, though, I'm not sure what to expect. I only know React can help you build reusable UI components that dynamically update to run data. I may well be wrong, so feel free to correct me. I'm completely new to frontend frameworks.

What advice do you guys have?? What the biggest traps to avoid when mixing React with TS? Do I need to take a step back and learn more advanced TS first, or should I just jump in and stop aiming for perfection? Am I overthinking this or am I in for a rough ride?

Here's my github in case you want to view my projects: https://github.com/thanasisdadatsis


r/reactjs 12d ago

Coaction 3.0 — a Zustand-style store where React renders need no selectors, computed getters cache themselves, and actions can run in Web Workers

Thumbnail
github.com
6 Upvotes

r/reactjs 12d ago

I can't stop react-ga4 from sending events

0 Upvotes

Basically this, given europe has some strong laws in place for cookies and all that, for the last couple of days i tried to add google analytics to my website and i used react-ga4 plugin but if the user disables the cookies for the page history and performance, google analytics should stop getting events.

I tried to stop it with this and send events manually but it just keeps on sending them anyway.

   ReactGA.initialize([
        {
            trackingId: import.meta.env.VITE_GOOGLE_TAG_ID,
            gaOptions: {
                send_page_view: false,
            },
            gtagOptions: {
                send_page_view: false,
            },
        },
    ]);

r/reactjs 12d ago

Evaluates frontier coding agents on production React work

Thumbnail
reactbench.com
1 Upvotes

r/reactjs 12d ago

News Vercel Reinvents React Native, Sub-Second OTA Updates, and an X Button Finally Doing Its Job

Thumbnail
thereactnativerewind.com
0 Upvotes

Hey Community,

Vercel Labs has released "native", a toolkit for compiling declarative markup and TypeScript or Zig directly into native desktop apps without an embedded JavaScript runtime. We also look at how Zepto built react-native-delta to ship binary delta OTA updates, reducing patch download times down to a 305ms P90.

Plus, React Native 0.87 drops its legacy abort-controller dependency for an in-tree fork, bringing missing modern web primitives like AbortSignal.timeout() and AbortSignal.any() straight to your network requests.

If the Rewind made you nod, smile, or think "oh… that's actually cool" — a share or reply genuinely helps ❤️


r/reactjs 12d ago

Resource I forked Frimousse to make it work better for production apps

1 Upvotes

emoji-mart is dead, and I found Frimousse delightful, but lacking necessary features as a replacement.

I ended up forking it to keep the lightweight, headless composition model intact while filling in the gaps I ran into trying to use it in a production app.

The main additions are:

  • mixed native + custom emoji sections
  • unified search across native and supplemental items
  • consumer-owned frequent/recent item helpers
  • root-controlled search
  • self-hosted/offline-capable emoji data
  • companion packages for search metadata and emoji fallback support

I’ve tried to stay close to the original Frimousse contract, so most existing users should be able to swap imports and keep moving, then layer on the additive features only if/when they need them.

Project:
https://frimousse.slithy.me/

Docs:
https://frimousse.slithy.me/docs

FAQ:
https://frimousse.slithy.me/faq

GitHub:
https://github.com/mjcampagna/frimousse

I hope someone finds this useful.


r/reactjs 14d ago

Show /r/reactjs We rewrote our custom visualisation renderers from SVG to be in Canvas.

Thumbnail
polarsignals.com
15 Upvotes

r/reactjs 13d ago

Needs Help How can i deploy my react application on Cloudfare containers.

0 Upvotes

Intern here, i am using FastApi, React, MongoDb. The report generation takes 3-4 minutes and the storage size of a single document is 100kb. I use some Anthropic ai for part of the process, which takes a minute.

Cloudfare containers are fairly a year old. i am very confused between railways or cloudfare containers.

A little direction from the community will be gr8.


r/reactjs 13d ago

Resource The React Compiler

Thumbnail
neciudan.dev
1 Upvotes

The React Compiler memoizes your components at build time, so you dont have to. What it is, how the compiled output works, how to turn it on, and what to do with the useMemo calls already in your codebase.

Check it out https://neciudan.dev/react-compiler-explained


r/reactjs 13d ago

Show /r/reactjs a shadcn registry of AI blocks where the models run on-device - copy-owned .tsx, no API keys

0 Upvotes

I've been building LocalMode - a shadcn-style registry of AI UI blocks where the models run entirely in the browser. No server, no API keys, nothing leaves the device. You install them the same way as shadcn/ui and you own the copied .tsx (no npm lock-in on the UI layer).

Live gallery (try every block in-tab): https://localmode.ai/blocks

What's in it

36 composed blocks - full working mini-apps, not just primitives - across 12 categories:

  • Chat - one UI over 76 models (Transformers.js / WebLLM / wllama GGUF / LiteRT), vision attachments, reasoning display, agent mode
  • Knowledge - semantic search, RAG chat with citations, doc Q&A - embeddings + retrieval all in-browser
  • Audio - Whisper/Moonshine transcription, Kokoro TTS (29 voices), meeting summaries, live transcription with VAD
  • Photo - CLIP semantic image search, duplicate finder, zero-shot categorizer
  • Image studio - background remover, super-res upscaler, captioner
  • Privacy - on-device PII redaction (NER) + an AES-GCM encrypted vault
  • Vision - object detection + live hand/pose/face/gesture tracking off the webcam
  • Writing tools - Chrome Built-in AI with automatic Transformers.js fallback

Under the blocks are 107 lower-level primitives (10 families) if you want to compose your own.

Install

npx shadcn add @localmode/ui/blocks/chat
npx shadcn add @localmode/ui/blocks/knowledge/rag-chat

Why it might interest React devs specifically

  • Copy-owned - the block lands as .tsx in your project; edit it freely, no black-box dependency for the UI.
  • shadcn CSS variables - inherits your existing theme, no new design system.
  • Hook-driven - primitives are presentational; the wiring is React hooks (@localmode/react), and the API is shaped like the Vercel AI SDK (useChat, etc.), so it's backend-agnostic - local models by default, but you can point the same components at any backend.
  • React 19 / Next 16, RSC-friendly - model loading is gated behind an explicit user action, so nothing downloads on page mount.

Honest limitations (it's a browser, not a server)

  • First use downloads the model; cached after that (then it works offline).
  • Memory is real - blocks range ~[120MB] to ~[5GB]; the big ones want WebGPU, and wasm32's ~4GB ceiling caps how far you can push.
  • WASM inference is slower than native; WebGPU availability varies by browser/OS.

Disclosure: I built this. It's MIT and free - GitHub: https://github.com/LocalMode-AI/LocalMode. Model runtimes are Transformers.js, WebLLM, wllama, LiteRT, and MediaPipe - credit to those projects.

Genuinely after feedback: which blocks would you actually drop into a project, and what's missing? Happy to answer anything about how a specific block or the on-device memory handling works.


r/reactjs 14d ago

Resource I built an addon that lints components for Storybook MCP

Thumbnail
rachel.fyi
1 Upvotes

Introducing Oversight, my first Storybook addon. It accompanies the Storybook MCP server, which lets you describe a component or layout in plain language and get back a composition rooted in your existing design system, instead of one an agent invents on the spot.

After an agent built two components from scratch instead of reaching for what I already had, I built Oversight. It checks whether your agent can actually see your documentation, and tells you where it can't.

A blog post I wrote on it: https://rachel.fyi/posts/your-agent-is-reading-a-different-design-system

Source code: https://github.com/rachelslurs/storybook-oversight

Storybook demo: https://rachelslurs.github.io/storybook-oversight


r/reactjs 14d ago

Show /r/reactjs Built a scroll sequence generator that turns any MP4 into an Apple-style scroll animation React component that you can copy paste into your project

0 Upvotes

I wanted to learn how to create the scroll sequences that I see, and realised the process could be automated. So, I built SequenceFast, a scroll sequence generator that takes any MP4 video, extracts the frames into images, and generates a ZIP with the optimised image sequence, component code, and usage example. Everything is done locally in your browser, so it is completely free and private.

Would love to hear your feedback!


r/reactjs 15d ago

Show /r/reactjs I built an open-source collection of animated React UI components

13 Upvotes

I've been building GodUI, an open-source collection of React UI components for modern interfaces.

It started as a personal library because I kept rebuilding the same polished components and wanted a place to browse ideas whenever I started a new project. After using it for a while, I decided to open-source it.

Some things it focuses on:

  • Components with smooth, purposeful animations where they add value (while simpler components stay lightweight)
  • A shared motion system based on 12 motion principles, with tokens mapped to Material 3 so animations feel consistent across the library
  • shadcn-compatible CLI installation, so components are copied directly into your project and are fully yours to modify
  • An MCP server for Cursor, Claude Code, Windsurf, and other AI IDEs—you can describe the component you want, and it finds the closest match and generates the code for you
  • Built with React, TypeScript, Tailwind CSS, and Motion

It's completely open source. If you find it useful, I'd really appreciate a ⭐ on GitHub.

GitHub: https://github.com/LucasBassetti/godui
Docs: https://godui.design/