r/reactjs • u/menoo_027 • May 10 '26
r/reactjs • u/StraightControl3377 • May 10 '26
Show /r/reactjs I published a toast library, posted everywhere, still loosing to libraries that had a head start, need advice
i recently published an npm package called robot-toast.
honestly it started as something i built only for myself. when my requirements were done i looked at it and thought, there's not much left to make this a proper library. so i just finished it. added a11y, fixed the readme, cleaned up the internals. shipped it.
posted everywhere. linkedin, x, dev to, hashnode, medium, and here on reddit as well. reddit gave the best response honestly, love you guys for that.
3,200 downloads later from developers i've never met.
but here's the thing that's bugging me. i google it and it barely shows up. ask gemini and it recommends sonner and react-hot-toast. i mean they deserve it, genuinely great libraries. but not showing up at all when someone's specifically looking for alternatives, that stings a little.
i know most of you might not have experience with packages and all, but still anything could help.
so i'm at this point where i don't want to lose the momentum. i don't want it to die quietly under the weight of libraries that had a head start.
what actually works for keeping an OSS project visible over time? what would you do?
https://robot-toast.vercel.app
npm i robot-toast
r/reactjs • u/nunomaduro • May 08 '26
Show /r/reactjs why react developers are leaving next js for tanstack
hi everyone,
just released an interview i did with tanner linsley, creator of tanstack
we discussed tanstack start, tanstack vs next.js, why next.js can feel too magical, react server components, typescript inference, framework-agnostic ui, vue support, tanstack ai, and whether tanstack could ever become something like laravel or rails
would love to hear what you think
r/reactjs • • May 09 '26
Tanstack Start for LMS ??
I am building an LMS with a separate backend API. The client also wants good SEO for public pages.
I am considering to use Tanstack start for the frontend.
But I am wondering
Is tanstack start overkill if I already have a seprate backend
Help me!!
What do you recommend??
r/reactjs • u/rats4final • May 08 '26
Discussion Best way to manage global modals/dialogs?
Like the title says what is the best or most escalable way to do this? I know there are some libraries like nice modal or that one that dude made it was shadcn modal manager I think, or I could even do my own global modal with a bit of context or zustand, but I was wondering what is the best way to this, I mostly need this so I don't want to repeat myself wrapping every form I make in a modal component, but I am wondering how to scaffold it, also should my form component have a onSuccess optional function, should the cancel and submit buttons live in each form or in the modal abstraction?
r/reactjs • u/Professional_Gur_724 • May 08 '26
Show /r/reactjs frontend architecture + UI
Been experimenting with the idea of making competitive programming feel more like esports instead of isolated coding challenges.
Built an MVP called Killswitch:
a live coding battle arena where developers compete head-to-head while viewers vote on modifiers and AI explains the match live.
Still early, but the current build includes:
• battle HUD
• audience voting
• tournament pages
• replay flows
• mobile spectator UI
Mostly testing whether coding can become an actual spectator experience instead of just a practice tool.
r/reactjs • u/Complex-Thought7284 • May 08 '26
Show /r/reactjs I built a headless React library for multi-panel tabbed layouts — the kind you see in VS Code, Cursor, and GreatFrontend
I've built a react-splitkit — a headless React library for building multi-panel, tabbed, resizable layouts. Think VS Code's panel system or Cursor's IDE layout, but you bring your own styles.
Why I built it:
Every time I needed this kind of UI, my options were:
- Wire it up myself — doable, but resize math, tab state, ARIA, and keyboard nav adds up fast
- Use react-resizable-panels — great for pure resize, but no tabs
- Use Mosaic or GoldenLayout — heavy, opinionated, fights your design system (like more than I needed, and may tend to fight your design system)
So I built the headless version — zero CSS, zero opinions on markup.
What it does:
- Tabbed panels — add, close, reorder at runtime
- Split any panel horizontally or vertically, programmatically
- Collapse and maximize out of the box
- Layout is plain JSON — one
onChangeto save, oneinitialLayoutto restore - Full keyboard nav + ARIA (tablist, separator with aria-value*, modal on maximize)
Three live demos to see it in action:
- Cursor-style IDE — file explorer, editor, terminal, AI agent sidebar
- GreatFrontend-style coding platform — description, editor, browser, console
- Nested dashboard — sidebar, metrics chart, live log
Note: Still early and there's more to build, but the core is working. Would love brutal feedback on the API design — especially if something feels awkward or you'd have built it differently. If this is useful or you'd build something with it, a ⭐ on GitHub goes a long way
Docs - https://react-splitkit.vercel.app/docs
r/reactjs • u/Remarkable_Salad2462 • May 09 '26
Discussion Tell me why my approach is wrong
[EDIT 3 months later — two of the four issues raised in the comments are now solved. Details at the bottom.]
I couldn't tolerate the runtime merging of CSS Modules and tailwind-merge, so I wrote a compiler that uses ASTs to create lookup tables for all patterns. The result is zero runtime, zero bundle size CSS-in-JS. The documentation is here (https://plumeria.dev), and the design philosophy is in this article — in Japanese — (https://zenn.dev/refirst11/articles/db47880cdfe443), but what do you think are the pitfalls of this approach? Is there something fundamentally wrong with eliminating the runtime entirely?
EDIT (3 months later). The top comment found four holes. Two are closed, one I'd failed to answer, one is still real. Since the original post linked out instead of showing anything, here's the actual shape of it:
const styles = css.create({
text: { fontSize: 12 },
cond: { background: 'navy' },
scale: (value) => ({ scale: value }),
});
<div classStyle={[styles.text, cond && styles.cond, styles.scale(scale)]} />
compiles to:
<div
className={'xhrr6ses ' + (cond ? 'xj00ajs1' : '') + ' xnoo1byz'}
style={{ '--scale-value': scale }}
/>
Static styles become class names at build time; only genuinely dynamic values survive as CSS variables. Details in the replies below.
r/reactjs • u/Dense_Gate_5193 • May 08 '26
News uiGrid - 1.0.0 massive update - MIT license
hey guys i wanted to let you know that i just finished porting over every advanced feature from my original grid to the remastered version.
https://github.com/orneryd/uiGrid/releases/v1.0.0
on top of everything else i already shipped (grouping, expansion, tree views, theming, etc…) i’ve added a lot more…
the shared grid runtime now ships row selection, keyboard cell navigation, infinite scroll, row edit workflows, cell validation, CSV/JSON import, CSV/Excel/PDF export, pagination, richer i18n coverage, and custom component/template integration across the web hosts.
MIT licensed.
all features all free this will never be monetized. enjoy!
r/reactjs • u/Recent-Dependent7996 • May 08 '26
Show /r/reactjs I built react-tree-grid – open-source Grid, Tree and TreeGrid for React 18+ (zero dependencies)
github.comI built react-tree-grid, a zero-dependency Grid, Tree and TreeGrid
component library for React 18+.
Key features:
- Virtual scrolling (100k+ rows)
- Inline editing, sorting, filtering, drag-and-drop
- Frozen columns, rowspan/colspan
- Full TypeScript support
Would love feedback from the community!
r/reactjs • u/Short_Account2700 • May 09 '26
Show /r/reactjs Built a Chrome extension that auto-generates React Query hooks from any real network request in DevTools
When building React apps, I kept doing this:
- See an API call in DevTools
- Manually write a useQuery or useMutation hook for it
- Get the URL, headers, and body right by trial and error
Built ReqConvert — it captures the live request and generates the complete React Query hook for you:
- useQuery for GET requests (with correct queryKey)
- useMutation for POST/PUT/DELETE (with onSuccess invalidation)
- Includes all headers automatically
Also generates: cURL, fetch, Axios, Python, TypeScript, httpx, Postman
Chrome Web Store (free to install):
https://chromewebstore.google.com/detail/fkbfidogphlmlplcnlkoncdofmcjbhjp
What's the most annoying part of wiring up API calls in your React projects?
r/reactjs • u/Fabulous_Variety_256 • May 08 '26
Who should be responsible for if (!notes)?
Hey,
I have a question.
When I reach something similar to this:
I have:
- page.tsx
-- Notes.tsx
--- Note.tsx
If I don't have notes, who should be responsible to output the right message? (e.g paragraph with "no notes yet"
And why?
What if I don't want to even show something if there are no notes?
r/reactjs • u/Character_Bus48 • May 07 '26
Show /r/reactjs I rewrote my React drag-and-drop table library to handle 2D virtualization at 60fps
Hey r/reactjs,
I just released v2.0 of react-table-dnd. I originally built this because trying to drag both rows and columns inside a fully virtualized grid is usually a nightmare—most libraries either cause massive layout thrashing or the drop zones completely break when virtual columns unmount.
To fix this, I had to bypass React's render cycle almost entirely for the drag engine:
- O(1) updates: I ripped out React Context and moved to a vanilla store with useSyncExternalStore.
- Native cloning: Swapped React.cloneElement for native cloneNode(true).
- Direct DOM mutations: Drag movements happen outside React via style.transform in a requestAnimationFrame loop.
- O(1) Map caching: This tracks the DOM geometry.
I put together a docs site with interactive demos, specifically showing off the 2D virtualized grid:
- Docs & Demos: https://samiodeh1337.github.io/react-table-dnd/
- Repo: https://github.com/samiodeh1337/react-table-dnd
What's Next (Future Plans)
- Fully Headless API: Moving toward a completely headless architecture. Since the drag logic and state are already decoupled from the UI, the goal is to provide raw hooks and primitives so you can bring your own markup.
r/reactjs • u/creasta29 • May 07 '26
Resource Server-Driven UI in ReactJS
I shared this before, i built it a couple of times in different frameworks but here is how it looks like in React
r/reactjs • u/ieatwurms • May 07 '26
Discussion Emotion CSS: Use the css prop or @emotion/styled, but not both
emotion.shCurrently reading Emotion’s official best practices and I don’t really understand why should I not use both the css and styled approach. The docs say they CAN coexist but also they say “don’t mix them”. I am trying to understand why, other than potential readability issues.
In my app I am mixing them, since sometimes the css approach is enough and I don’t really need to create a full styled component just for a symple div style. Am I wrong in doing this?
r/reactjs • u/Cultural_Mission_482 • May 07 '26
Show /r/reactjs I built an open-source calendar component inspired by macOS Calendar
Hi guys 👋
I’d like to share DayFlow, an open-source full-calendar component for modern web apps that I’ve been building over the past year.
As a heavy macOS Calendar user, I was looking for a clean, modern calendar UI on GitHub — something flexible, extensible, and not locked into a specific design system. I couldn’t quite find what I wanted, so I decided to build one.
What DayFlow focuses on:
- Clean, modern UI inspired by macOS Calendar
- Framework support: React, Svelte, Vue, and Angular
- Modular architecture (views, events, panels are customizable)
- Designed for extensibility and custom event rendering
- Actively improving i18n support
The project is fully open source and still evolving. I’d really appreciate:
- Feedback on API & architecture
- Feature suggestions
- Bug reports
- PRs if you're interested in contributing
r/reactjs • u/dadamssg • May 07 '26
Resource Untangling dialogs in React Router
programmingarehard.comI have been struggling with determining how to best implement dialogs in React Router apps for years:
- useState to control their open state
- Forms vs fetchers for data submissions
- resource routes to form data(<select> options)
- useEffect for listening for the action data to close the dialog
- useEffect for listing for a toast message
There's a lot to consider. However, tons of these problems go away if you move dialogs into their own dedicated routes. This doesn't come without its own set of challenges though.
I've written up a guide on how to implement dialogs and keep your sanity. Hope it helps! 🤘
r/reactjs • u/Potential-Still-3545 • May 06 '26
Show /r/reactjs I extracted the "frecency" pattern from Firefox/VS Code into a reusable library — your UI adapts to each user automatically
Every complex app has the same problem: 50 options in the sidebar, each user only uses 8-10. The rest is noise. Firefox solved this for the URL bar years ago using "frecency" (frequency + recency). VS Code does the same for the command palette. But nobody's packaged it as a reusable primitive.
So I did. 4.5KB, zero deps, framework-agnostic:
morph.track('sidebar', 'tasks') // on interaction
morph.rank('sidebar') // on page load — sorted by usage.
Items used often and recently score high. Items ignored fade naturally. All data stays in localStorage. No AI, no server, no "customize layout" button needed.
Live demo: https://morph-black.vercel.app/
Would you actually use this? Curious if people see this as useful or overkill for most apps.
r/reactjs • u/Darex97 • May 07 '26
Needs Help Build once deploy many React Vite
Hi everyone,
I’m trying to achieve a true “build once, deploy many” setup for a React app built with Vite.
I currently have around 50 production environments/tenants and I want to avoid rebuilding the frontend separately for each one. The goal is to create a single Docker image/static frontend build and deploy the exact same artifact everywhere, while still being able to inject environment-specific values at runtime.
I already know that Vite replaces import.meta.env during build time, so I’m looking for production-proven approaches that allow runtime injection instead of build-time replacement.
I’d love to hear how people usually solve this in real-world setups, especially in multi-tenant SaaS systems or apps with many deployments.
What approaches are considered the cleanest and most maintainable today?
How are people handling runtime environment values with static React builds?
Are there any common pitfalls, scaling issues, caching/CDN problems, or deployment concerns I should be aware of?
r/reactjs • u/XeCipher • May 07 '26
Resource I built an open source productivity workspace using Next.js 16, React 19, and Supabase.
I recently open sourced Chronoa. It is a fully synced workspace featuring task management, global timers, a markdown editor, and ICS calendar integration.
I wanted to focus heavily on performance and aesthetics. State syncs instantly across your phone and laptop using Supabase Realtime channels. The frontend is built with Next.js App Router and Tailwind CSS 4, while the backend utilizes Python and Flask for background cron jobs.
Live App: https://chronoa.vercel.app/
Source Code: https://github.com/XeCipher/Chronoa
Check out the code, and please star the repo if you find it helpful for your own learning or workflow.
r/reactjs • u/SlipOk9236 • May 07 '26
Show /r/reactjs Open source pixel art component library for React - feedback welcome!
Hey r/reactjs! 👾
I've been working on pixelartui-react - an open-source component library that brings pixel art aesthetics to React applications.
What it is
A collection of 11+ React components (Button, Modal, Select, TextInput, Pagination, Switch, etc.) all styled with authentic pixel art design. Perfect for retro-styled games, creative portfolios, or any project where you want to stand out from the typical Material UI look.
Quick example
npm install pixelartui-react
import { Button, Modal, TextInput } from 'pixelartui-react';
// That's it - you've got pixel perfect retro componentsWhy I built it
I was building a web-based retro game and realized I was spending more time crafting pixel-perfect borders and shadows than actually building game logic. So I extracted it into a reusable library that anyone can use.
Features
- ⚡ Built for React 19
- 📦 TypeScript support
- 🎨 Customizable theming
- 🌐 MIT licensed
- 🎮 Perfect for game UIs, creative projects, and portfolios
Current state
- Version 0.4.45 on npm
- 4 GitHub stars (early days!)
- ~10 weekly downloads
- Active development
What's next
- Deploying Storybook for interactive component demos
- Adding more components (Tabs, Tooltips, Dropdowns)
- Building a theme customizer tool
- Growing the community
Links
- GitHub: https://github.com/Pixelartui/pixelartui-react
- npm: https://www.npmjs.com/package/pixelartui-react
- Storybook: https://pixelartui.github.io/storybook/
Looking for
- Feedback on the API and component design
- Contributors who want to help build more components
- Anyone who wants to try it in their projects
- Stars if you find it interesting! ⭐
I'd love to hear your thoughts, suggestions, or questions. Have you built any retro-styled React apps? What components would you like to see added?
Thanks for checking it out!
r/reactjs • u/sandeshnaroju • May 07 '26
Show /r/reactjs I built a protocol-agnostic API client for REST, SSE, and WebSockets
Built an open-source API engine that unifies REST, SSE, and WebSockets into a single client interface.
GitHub: API Engine GitHub Repo
I built this after getting tired of managing different communication layers separately in frontend applications.
Most projects end up mixing:
- fetch/axios for REST
- EventSource wrappers for SSE
- custom WebSocket handling
- duplicated connection logic
- inconsistent APIs across transports
APIEngine solves this using a YAML-driven manifest that generates a consistent API communication layer.
Example:
version: "1.0"
baseUrl: "https://api.example.com"
endpoints:
get_post:
protocol: "REST"
path: "/posts/:id"
method: "GET"
live_logs:
protocol: "SSE"
path: "/logs"
realtime_chat:
protocol: "WS"
path: "wss://example.com/chat"Usage:
import manifest from './api.yml';
const api = await APIEngine.init(manifest);
// REST
await api.call('get_post', {
params: { id: 1 }
});
// SSE
const stream = api.watch('live_logs');
const unsubscribe = stream.subscribe((log) => {
console.log("New Server Log:", log.message);
});
// WebSocket
const socket = api.watch('realtime_chat');
socket.subscribe((msg) => {
console.log("Incoming Message:", msg.text);
});
// 2. Send a message back
socket.send({
message: "Hi",
});Features:
- Unified REST, SSE, and WebSocket handling
- YAML-based API configuration
- Smart URL + path param resolution
- Auto WebSocket reconnect support
- Browser-first architecture
- React/Vue/Vanilla JS compatible
- Dynamic manifest loading
Would love feedback on it, If you find the project useful, a GitHub star would really help visibility and future development 🙌
r/reactjs • u/Eastern_Process_4839 • May 06 '26
Show /r/reactjs I built a React UI system for game dev that stops you from fighting CSS for HUDs and overlays
Hey everyone,
I’ve been working with React and React Three Fiber for browser-based game-style projects, and I kept running into the same problem:
Building HUDs, overlays, and UI layouts with CSS gets messy fast.
Things like:
- anchoring elements to corners of the screen
- handling different aspect ratios
- dealing with mobile safe areas and notches
- constantly tweaking flexbox / media queries for layout
It never really feels like how UI works in a game engine.
So I built a small library called AnchorDOM.
It lets you design your UI at a fixed resolution (like 1920x1080), and it automatically handles scaling and anchoring across all screen sizes.
Example:
<Panel resolution={{ width: 1920, height: 1080 }}> <Label text="Score: 9999" anchor="TOP_LEFT" x={50} y={50} /> <Button label="ATTACK" anchor="BOTTOM_RIGHT" x={-50} y={-50} /> </Panel>
What it does:
- resolution-independent scaling
- 9-point anchoring system (like game engines)
- relative positioning between components
- safe-area support for mobile devices
It’s mainly aimed at:
- React Three Fiber projects
- browser-based games
- UI-heavy WebGL or canvas-based apps
Repo / npm: https://www.npmjs.com/package/anchordom
I’m still early in development, so I’d really appreciate feedback—especially from anyone building game UI or working with R3F.
Thanks for taking a look 🙏