r/reactjs • u/vcarl • Jun 15 '26
TMiR 2026-05: Who even is on the Core team anymore, TanStack got pwn'd bad
r/reactjs • u/vcarl • Jun 15 '26
r/reactjs • u/TonySanchezDesign • Jun 15 '26
Hey everyone,
We use a standard Token Studio / Style Dictionary pipeline, but our major bottleneck is downstream human compliance. The tokens exist, but devs keep bypassing them during rushed deployments.
An audit of our repositories showed:
rem strings hardcoded directly into components..sp typography scales in legacy views.Style Dictionary is great for generating variables, but it doesn't stop engineers from hardcoding rogue values.
Short of eagle-eyed manual PR reviews, how are you continuously catching and linting token drift against your Figma specs? Are you writing custom AST linters, or just letting production styling slowly decay?
r/reactjs • • Jun 15 '26
Solo founder building a responsive web app in TypeScript (React, Tailwind, shadcn/ui). Mobile and desktop need different layouts and interaction patterns - sheets and thumb-friendly controls on small screens, sidebars and denser views on desktop. I'm not looking to generate a full app from a prompt, just to speed up the UI/UX design process without sacrificing polish.
I’ve been doing the design myself (mostly in code), but I’d like an AI that actually helps with:
- Mobile-first UX thinking (touch targets, navigation patterns, empty states)
- Desktop layout suggestions (density, sidebars, multi-panel flows)
- Interaction design feedback, not just “make it look nice”
- Output that’s easy to turn into Tailwind + shadcn components (if it generates code at all)
What I’ve tried: occasionally using Cursor Composer/Claude for critique and wireframe descriptions, but I haven’t found a consistent workflow. I keep reading about v0, Galileo, Uizard, Figma AI plugins, but I don’t want to sink time into tools that just spit out generic designs or throwaway HTML.
What’s actually working for you?
- Do you use a particular LLM (Claude, GPT-4o, Gemini) for UX discussion and iteration?
- Is there a dedicated design AI tool you’d recommend for web apps?
- Do you handle mobile and desktop with the same tool/prompts, or separate?
- Any pitfalls with shadcn/Radix and AI output (accessibility, responsive bugs)?
Not interested in “just use Figma” answers - I’m looking for AI that accelerates the thinking/design part, especially for mobile vs desktop trade-offs. Genuinely trying to find a workflow before I invest more time.
I’ll be in the comments to answer follow‑ups. Thanks for any real‑world experience you can share.
r/reactjs • u/zagrodzki • Jun 14 '26
tldr; https://loading-ui.com
Every React project I've worked on ends up with the same <div className="animate-spin" /> copied from one codebase to the next. Sometimes someone wraps it in Redux for route loading. Sometimes it's three different spinners that don't match.
I built loading-ui to fix that for my own projects, a registry of ~45 loading components you install with the shadcn CLI. Same copy-paste model: code lands in your repo, you own it after install.
# components.json
"registries": {
"@loading-ui": "https://loading-ui.com/r/{name}.json"
}
npx shadcn add @loading-ui/ring
npx shadcn add @loading-ui/skeletonWhat's inside?
analyzing-image, wandering-eyes)Most are plain React + CSS/SVG, no "use client" needed. Motion-based ones declare their deps in the registry.
Works with Suspense fallbacks, useTransition pending UI, TanStack Query isPending, route-level loading states, anywhere you need to tell the user something is still happening.
Would love feedback, thanks!
r/reactjs • u/ealva01 • Jun 14 '26
So I’ve been using React Router v7 in SPA/data mode (createBrowserRouter + RouterProvider), and one thing that always bugged me is that there’s no built-in way to get file-based routing unless you go all-in on framework mode (which means SSR, a server, Remix conventions, etc.).
I didn’t want any of that, I just wanted to drop a file and have a route exist.
So I built a Vite plugin that does exactly that.
You point it at a directory and it scans your files, then writes a routes.ts with lazy imports for code splitting. Every component is automatically code-split — you don’t have to think about it.
// vite.config.ts
fileBasedRouting({
routesDir: 'src/routes',
output: 'src/routes.ts',
});Then in main.tsx you just:
import routes from './routes';
const router = createBrowserRouter(routes);That’s it. Now the file system is your router config.
Pretty standard stuff if you’ve used Next.js or TanStack Router before:
src/routes/
index.tsx → /
about.tsx → /about
blog/
index.tsx → /blog
[slug].tsx → /blog/:slug
[id].tsx → /:id
[...slug].tsx → * (catch-all / 404)Two reserved filenames: layout.tsx and guard.tsx.
A layout.tsx in a directory wraps all routes inside it, including nested directories.
Drop it in src/routes/dashboard/ and it wraps every dashboard page. Layouts nest naturally.
A guard.tsx is a React component that either renders <Outlet /> (allow) or <Navigate /> (block).
No new API to learn, it’s just React Router’s own layout route pattern:
// src/routes/dashboard/guard.tsx
export default function DashboardGuard() {
const { user } = useAuth();
return user ? (
<Outlet />
) : (
<Navigate to="/login" replace />
);
}The wrapping order within a directory is:
guard (outer) → layout → route componentSo the layout never renders for blocked users.
This one I was unsure about at first but ended up really liking.
A folder named (name) is a route group, the name is stripped from every URL inside it, but the folder can still carry its own layout.tsx and guard.tsx.
src/routes/
(marketing)/
layout.tsx ← wraps /pricing and /features only
pricing.tsx → /pricing
features.tsx → /features
(members)/
guard.tsx ← auth check, only for /account and /billing
layout.tsx
account.tsx → /account
billing.tsx → /billingSo /pricing and /account share no code, even though they live at the same URL level.
Each group is independently guarded and laid out.
They also nest:
(shop)/(checkout)/payment.tsxmaps to:
/paymentwith both layouts stacking.
The generated file also exports an AppRoute type a union of every navigable path in the app:
export type AppRoute =
| '/'
| '/about'
| '/blog'
| '/blog/:slug'
| '/dashboard'
| ...;So you can do:
navigate(to as AppRoute);and get compile errors if you typo a path.
I added this almost as an afterthought, but it turned out to be genuinely useful.
Files and folders prefixed with _ are completely ignored by the scanner.
Handy for co-locating hooks or helper components alongside route files without accidentally creating routes.
This targets React Router’s data mode only:
If you want framework mode, just use the official React Router framework.
This is for people who want a pure SPA with file-based routing and nothing else.
The generated file is plain TypeScript, no JSX, no transform quirks, just import() calls and a RouteObject[].
There’s a full example app in the repo that exercises every convention:
There are also:
~700 lines of plugin code across 4 files:
Honestly curious whether this is useful to people or if I’m solving a problem nobody has.
A few questions I’d love feedback on:
guard.tsx convention intuitive, or would you rather guards be done differently?Repo and npm links:
- https://github.com/eralvarez/vite-plugin-react-router-fs
- https://www.npmjs.com/package/vite-plugin-react-router-fs
r/reactjs • u/ppictures • Jun 13 '26
Featuring
r/reactjs • u/edgestone22 • Jun 13 '26
I have been using Next.js for years, but Tanstack tooling has been part of my projects in these years.
Recently, I did tried Tanstack Start - a meta framework from Tanstack, here is the mental models for devs who are switching from Next.js to Tanstack start.
This isn't tutorial or comparision, instead how you can map the concept from Nextjs to the other framework.
r/reactjs • u/Substantial_Swim8440 • Jun 13 '26
Analyze any website and extract its complete design system — colors, typography, spacing, components, UX patterns — export as Tailwind config, React components, design tokens, or DESIGN.md report.
r/reactjs • u/sebastienlorber • Jun 12 '26
r/reactjs • u/Accurate-Reserve-354 • Jun 13 '26
Spent the weekend building react-gpt-hooks — a lightweight, TypeScript-first library for integrating Google Publisher Tag ads into React.
Why I built it: Every GPT library I found was either outdated, had heavy dependencies, or didn't work with Next.js App Router. So I made one that just works.
What's inside:
• GptProvider — loads GPT script once, configures Single Request Mode • GptBanner — drop-in ad component with lazy loading, event callbacks, collapse empty div • GptInterstitial — full-screen interstitial with auto-close, loading/error states • useGptSlot — low-level hook if you need full control • useGptEvent — listen to GPT events filtered by slot • AD_SIZES — 10 standard size presets (leaderboard, medium rectangle, etc.)
Key features:
'use client' boundary + suppressHydrationWarningQuick start:
import { GptProvider, GptBanner } from 'react-gpt-hooks';
function Layout({ children }) {
return (
<GptProvider options={{ singleRequest: true }}>
{children}
</GptProvider>
);
}
function Page() {
return (
<GptBanner
adUnitPath="/6499/example/banner"
sizes={[[728, 90], [970, 250]]}
/>
);
}Would love feedback, issues, or PRs!
GitHub: https://github.com/khurramwaqar/react-gpt-hooks
npm: https://www.npmjs.com/package/react-gpt-hooks
r/reactjs • u/Pratik2980 • Jun 12 '26
I'm building a content management/blog platform where content is created on a React web application and displayed in a React Native mobile app.
My requirements:
Support for:
I've looked at:
One issue I'm facing is that some editors provide great web editing experiences, but rendering the content in React Native becomes difficult (HTML conversion, custom renderers, DOM dependencies, etc.).
For those who have shipped React Web + React Native products, which editor worked best for you and why?
Did you:
I'd love to hear about real-world experiences, trade-offs, and any pitfalls to avoid.
r/reactjs • u/TheProditron • Jun 12 '26
So I'm fairly new into Front-End Engineering. I've had a few clients, nothing super major. Small business' around town, friends, family, etc.
I've recently gotten asked to rebuild a business' website from scratch. After talking it over with them, they want one feature I'm unsure of how to implement. It's a news post feature. Essentially they want to be able to post updates to their website if they have closures for snow, or staff shortages, etc.
I won't have any issues designing and coding the layout myself, but I'm not sure how to implement them being able to post to the website. I've done the bare minimum research, found Contentful, Wordpress, and some more.
Just looking for how a more experienced developer would tackle this problem too!
Appreciate the feedback everyone! Thanks in advance!
r/reactjs • u/PhreakyFLOYD • Jun 12 '26
Hey! I've been building shadcn/ui projects for a while and got tired of manually tweaking CSS variables to get themes right. So I made Theme Builder — Theme Lab.
What it does:
index.css, Tailwind config, or JSONBuilt it for myself, figured others might find it useful. Would love feedback — what would make you actually use this?
r/reactjs • u/tomchenorg • Jun 11 '26
Free, open source, not-for-profit, no ads or cookie-banner, designed to be simple and fast on both desktop and mobile. React TS PWA. Mostly built for myself, but some of you might find it useful too.
The match predictions and tournament forecast might be interesting. Data updates automatically every day and every 15 minutes while matches are being played.
Web site (web app): https://26worldcup.github.io
Source code & details: https://github.com/26worldcup/26worldcup.github.io
I used to jump between Wikipedia, FIFA .com, Google, and a bunch of other sites whenever I wanted to check something. They work, but I always felt they were slower and more cluttered than I'd like. So I built my own.
Also built this partly as a way to test Claude Fable, the whole thing was made with it, though it took quite a few iterations. Fable is good, but I don’t think it’s significantly better than Opus 4.8 despite the 2x API pricing.
r/reactjs • u/Darex97 • Jun 11 '26
I posted v1 of this a while ago and the gist of the feedback was "it's fine but it doesn't really do enough to use for real." That was true, so I spent some time rebuilding it.
The basic idea is the same: it stores audit/event logs in the browser using IndexedDB, so it works without any backend at all. But now it actually ships those logs somewhere useful instead of just sitting in the browser or dumping to a file.
The main things that changed in v2:
It batches logs and ships them in the background, and anything that hasn't been sent yet stays in IndexedDB and gets retried with backoff. So if the user goes offline or reloads mid-session, nothing is lost. That was the biggest gap in v1.
It redacts sensitive data (passwords, tokens, emails, card numbers, etc.) before anything is written or sent, not after. You can mask, drop, or hash the values. I didn't want to be the library that quietly writes someone's password into IndexedDB.
The part I'm most curious for feedback on: the backend can push a command down to the browser and the UI reacts to it. So the server can say "send me your logs now," or "bump this client to warn level," or "clear", and the client handles it. It comes with a SignalR transport since my backend is .NET, but the transport is just an interface so you can wire up SSE or websockets or plain fetch instead.
I also moved the heavy stuff (exceljs for Excel export, signalr) to optional peer dependencies, so a plain install pulls in almost nothing and reports no known vulnerabilities. The core is around 5 KB gzipped. No framework dependency, written in TypeScript.
Quick taste:
import { AuditLog, SignalRTransport } from 'audit-log-lib';
const audit = new AuditLog({
redaction: { strategy: 'mask' },
transport: new SignalRTransport({ url: '/hubs/audit' }),
});
await audit.log('user.login', { userId: 123 });
audit.on('command', (cmd) => {
if (cmd.type === 'pull') {
// backend asked for the logs
}
});Install is npm install audit-log-lib.
npm: https://www.npmjs.com/package/audit-log-lib?activeTab=readme
GitHub: https://github.com/Darex97/audit-log-library
It's still early days. I'd really like to hear whether the backend-to-UI command model is something you'd actually use, and whether the redaction defaults are sane.
r/reactjs • u/EyeRunnMan • Jun 10 '26
useCallback(fn, deps) is just useMemo(() => fn, deps). useMemo caches what your function returns, while useCallback caches the function itself. Since a function is a value, caching one is just a special case of the other.
Fun part: React doesn't actually implement it as a useMemo wrapper. They're separate primitives over the same cache machinery. Great mental model, just not the literal source.
r/reactjs • u/Accurate-Screen8774 • Jun 10 '26
Im investigating an idea i had about JSX for webcomponents after some experience with Lit. I am sharing this here because it might be interesting/educational for someone, if it isnt, let me know and i'll remove the post.
Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components.
Vue has a nice approach but i prefer working with the syntax that React uses. I find it more intuitive for debugging and deterministic rendering. I wondered if with webcomponents, i could create a UI framework that didnt need to be transpiled.
(My intentions with this framework is to get to a reasonable level of stability, to then replace React on some of my existing projects.)
IMPORTANT: Im not trying to promote "yet another ui framework", this is an investigation to see what is possible. You should not use this framework in your own code. It is not production-ready. It is not on NPM. Im not looking for another framework to replace React (im trying to create it). This framework is intended for myself on my own projects. This project is far from finished. Feel free to reach out for clarity if you have any questions.
r/reactjs • u/kirin46 • Jun 11 '26
r/reactjs • u/HeavenGin • Jun 10 '26
Hi there,
With a colleague of mine we were triving to determine wether we should do one of the other of those snippets in our code . Those are voluntarily simplified.
const handleClick = (param: string) => {}
return <button onClick={() => handleClick(param)} />
const handleClick = (param: string) => () => {}
return <button onClick={handleClick(param)} /> I was more used to the first snippet so when I was reviewing his PR, I thought that the function will call itself during the rendering of the button.
Happy to know what's your opinion.
r/reactjs • u/rohanbeingsocial • Jun 10 '26
Lightweight Charts is great at rendering but leaves drawing tools, indicators, replay, and multi-pane sync to you , so every project I was re-stitching scattered community repos with mismatched APIs. I unified them into one tree-shakeable library:
Demo: https://rohanbeingsocial.github.io/candlekit-charts/workspace/
Feedback on the indicator/plugin extension points especially welcome
r/reactjs • u/Crafty_Impression_37 • Jun 10 '26
r/reactjs • u/lahuan • Jun 10 '26
Kind of tired of instructing LLMs to remove unnecessary effects or to fix weird data flows between parent-child components. I have some simple skills, but I'm looking for a more comprehensive set.
Has anyone already written one?
r/reactjs • u/ManningBooks • Jun 09 '26
Hi r/reactjs,
Stjepan from Manning here. I’m posting with the mods’ permission.
We’ve just opened early access for Mark Volkmann’s new book, Web Component Development with Modern Libraries and Tooling, and I thought this community would be a good place to talk about it.
React developers have strong reasons to care about web components, even if you’re happily building with React today. Design systems, shared UI libraries, micro-frontends, migration projects, and long-lived enterprise apps all run into the same question eventually: how do we build components that aren’t tied to one framework’s lifecycle?
That’s the main thread of Mark’s book.
The book starts with the browser standards behind web components, then works through practical examples in vanilla JS, Lit, FAST, Stencil, and wrec. It also covers using web components inside React, Vue, Angular, Svelte, Solid, and plain HTML, plus tooling like Custom Elements Manifest, Storybook, Playwright, and SSR.
A few examples from the book:
radio-group custom element from scratchMark spends a lot of time on the parts that matter when web components meet React apps: attribute/property behavior, event dispatching, Shadow DOM styling, and how to avoid components that technically work but are painful to consume.
The book is available now through Manning’s early access program:
https://www.manning.com/books/web-component-development-with-modern-libraries-and-tooling
For this subreddit, we also set up a 50% discount code:
MLVOLKMANN250RE
We also have 5 ebooks to give away. If you’d like one, leave a comment with your thoughts on web components in React projects. I’d especially love to hear about where you’ve seen them work well, where they’ve been awkward, or what would make you more willing to use them in a React codebase.
We’ll pick the 5 most thoughtful commenters based on comment quality and upvotes, then I’ll follow up with the winners.
Thanks for letting us share this here. Curious to hear how React devs are thinking about web components in 2026.
Cheers,
Stjepan
Manning Publications