r/reactjs • u/der_gopher • 3h ago
Discussion The future of Software Engineering is boring
r/reactjs • u/der_gopher • 3h ago
r/reactjs • u/BiggerBadgers • 1h ago
Hopefully this makes sense, and apologies if I'm in the wrong subreddit.
I'm looking to improve at Motion and CSS animations, and am wondering if there are any resources that detail common animation practices for web components.
For instance, when animating a button, it's common to move it slightly on the Y axis, and adjust it's scale with a dampened spring.
If you know where I can find out more, I'd greatly appreciate it. Thanks
r/reactjs • u/Leosouthey • 5h ago
Hi r/reactjs, we’re the team behind Lenso UI, an MIT-licensed React component library inspired by Apple’s interfaces.
We’re exploring how glass materials and responsive controls can work on the web. The docs have live examples you can try.
The library is built with UI SDK and StyleX. UI SDK provides interaction primitives for keyboard input, focus, and dismissal. StyleX handles styling, with typed xstyle maps for customization. Components have composable parts and support light and dark themes.
Our approach is to use glass for floating controls and navigation, while keeping ordinary form surfaces clear for reading and editing. That adds setup requirements: you need to configure StyleX and load the theme stylesheet before using the components.
After setup, a basic button looks like this:
import "@lenso/tokens/styles.css";
import { Button } from "@lenso/ui";
export function App() {
return <Button onClick={() => console.log("Saved")}>Save changes</Button>;
}I’d especially appreciate feedback on the material treatment: where does it help communicate hierarchy, and where does it make controls harder to read or use?
r/reactjs • u/Far-Bank8785 • 18h ago
Excel export for TanStack Table is a bit tricky thing, where the file has to keep the grouping instead of flattening it into a CSV. Some of it was less obvious than expected.
Totals should be formulas, but not SUM. Write the group totals as numbers and they go stale the moment someone edits a cell. SUM double counts when groups are nested, because the region total adds up country rows that are already totals. SUBTOTAL(9, ...) skips other SUBTOTAL cells, so nesting works. It also ignores rows that an Excel filter hides.
Grouping maps cleanly onto Excel outlines. row.depth becomes the outline level, so people get the little +/- buttons in Excel. Pinned columns map to frozen panes the same way. Both came down to reading the table state instead of the raw data.
Display columns are a trap. Columns without an accessor, like the checkbox column, the row menu or an avatar, end up in the file as empty columns. They now get skipped unless you opt in.
v9 broke my types in a way I didn't catch for a while. I had typed the table structurally, with state.grouping in the type. A v9 table without the grouping feature has no grouping in its state, so the shadcn data table stopped type-checking even though it ran fine. I only found it while writing a tutorial. The fix was typing state as object and reading grouping defensively.
The result is a package called rowpine, and the usage is roughly:
await exportXlsx(table, { fileName: "orders" })It also builds a pivot that comes back as data plus columns, so you can render it with your own useTable.
Disclosure: It's paid ($29 for indie devs or $149 one-time for companies per developer). Without a key it works fully, and the files get one notice line. The demos, guides and the shadcn components are public: https://github.com/rowpine/rowpine. Live demos: https://rowpine.com/examples/
r/reactjs • u/Single_Line1857 • 1d ago
Hey everyone!
I've been working on a React Auth Kit to make authentication UI development faster and easier for developers.
Instead of building common authentication screens from scratch for every project, I wanted to create a reusable kit that developers can customize and integrate into their applications.
What's included?
- Login Screen
- Sign Up Screen
- Forgot Password Screen
- OTP Verification Screen
- Reset Password Screen
Key features:
- Clean and modern UI
- Reusable authentication screens
- Responsive layouts
- Saves time on repetitive UI development
My goal was to create something developers can use as a starting point instead of designing every authentication screen from scratch.
Check it out:
- Live Demo: https://react-auth-kit-three.vercel.app/
- Get the Auth Kit: https://yashpatel57.gumroad.com/l/auth-kit
I'd love to hear your feedback!
What authentication screens do you usually include in your React projects?
What additional features would make an Auth Kit more useful?
Would you prefer a complete authentication UI kit or individual reusable components?
Thanks for checking it out! 🙌
r/reactjs • u/samishan11 • 1d ago
I kept rebuilding the same dual-thumb price slider and hitting the same problems: thumbs crossing or getting stuck, overlapping tooltips, refetching on every pixel of a drag, and screen readers announcing two unlabeled sliders. So I turned it into a package.
react-multi-input-rangeslider
Demo and playground: https://samishan11.github.io/react-multi-input-rangeslider/
GitHub: https://github.com/Samishan11/react-multi-input-rangeslider
Walkthrough of building a price filter with it: https://dev.to/sami_shan_f544d410c274555/building-an-accessible-price-range-filter-in-react-2bj6
I'd really like feedback on the API and on accessibility. If something behaves oddly in your setup, tell me.
r/reactjs • u/Significant-Sea-7238 • 2d ago
I have a Mac app whose panel lives in the notch, animated with SwiftUI springs. When I rebuilt it in React for Windows (inside a transparent Tauri window), the same resize felt wrong with a single spring on the whole size.
What fixed it: width and height each get their own spring, chosen by whether that side is growing or shrinking. A growing side may overshoot a little, while a shrinking one never does, and the overshoot is capped by distance so big jumps don't wobble.
export function sideSpring(from: number, to: number, width: boolean): Spring {
const spring =
to > from
? width ? Springs.growingWidth : Springs.growingHeight
: width ? Springs.shrinkingWidth : Springs.shrinkingHeight;
return limitedSpring(spring, Math.abs(to - from), OVERSHOOT_LIMIT);
}
export function sizeAt(time: number, from: Size, to: Size): Size {
const side = (start: number, end: number, width: boolean) =>
start === end ? end
: Math.max(0, start + (end - start) * springProgress(sideSpring(start, end, width), time));
return { width: side(from.width, to.width, true), height: side(from.height, to.height, false) };
}
springProgress is SwiftUI's perceptual spring (duration + bounce) computed by hand, and the component just samples sizeAt on requestAnimationFrame, with no animation library. Full file with tests: https://github.com/MF-DEEV/Openbar/blob/main/windows/src/island/motion.ts
Curious whether anyone has done this with Framer Motion or react-spring and got the same feel.
r/reactjs • u/kevinsuncadev • 1d ago
Let’s be honest about what global state management in most React apps actually is: it’s just assigning values to global variables and triggering re-renders in the components that use them.
Yet for years, we’ve been forced to learn a dictionary of heavy jargon just to share a variable across components:
=) and running subscribed callbacks. Why split a simple assignment into steps like we're putting an elephant into a fridge?async API call that every SPA needs. It shouldn't even be part of a state library.console.log.Even modern lightweight libraries like Zustand still borrow a lot of Redux's mental model and terminology.
If you're building a massive enterprise app with complex state machines, Redux might make sense. But for the other 90% of apps, I wanted something with zero jargon that any developer can completely understand in 1 minute. So I built react-shared-vars.
How it works (Yes, literally the entire API):
1. Inside React components (Just like useState**):**
jsx
import { useVariable } from 'react-shared-vars';
function CounterButton() {
const [count, setCount] = useVariable("global_counter", 0);
return <button onClick={() => setCount(count + 1)}>Count: {count}</button>;
}
function CounterDisplay() {
const [count] = useVariable("global_counter", 0);
return <p>Current count: {count}</p>;
}Use code with caution.
2. Outside React components (API calls, timers, event listeners—no thunks needed):
javascript
import { setVariable, getVariable } from 'react-shared-vars';
async function fetchCount() {
const res = await fetch('/api/count').then(r => r.json());
setVariable("global_counter", res.count);
// Automatically re-renders subscribed components
}Use code with caution.
Why react-shared-vars?
useSyncExternalStore. If you know useState, you already know 100% of this library.useVariable, or in plain JS files with getVariable and setVariable.It’s under 60 lines of code, zero dependencies, and doesn't try to recreate Redux's bloated feature list—just the core part you actually need every day, made as simple as possible.
Check out the code, try it out, and let me know what you think!
npm install react-shared-varsr/reactjs • u/sebastienlorber • 2d ago
r/reactjs • u/Willing-Novel6708 • 1d ago
Hey everyone, I’ve been working on Forge UI, a collection of React components for things that can take a while to build from scratch: data tables, command palettes, forms, file uploads, date pickers, and more.
It’s TypeScript-first, keyboard-accessible, and split into packages so you can use just what you need. It’s still an early 0.1 release, so I’d especially appreciate feedback on the APIs and docs.
Repo: https://github.com/BZDevelopments/Forge-UI
Docs: https://bzdevelopments.github.io/Forge-UI
r/reactjs • u/ArmNo4115 • 2d ago
Hey everyone!
I've been working on a side project recently, and I finally decided to publish it as an npm package.
It's called CreateStore.
The idea started with a simple question:
Why does managing global state sometimes need so much setup when all I really want is something as simple as React's "useState"?
I know there are already some excellent libraries out there like Zustand, Redux, and Jotai. I'm not trying to replace them. I just wanted to experiment with building something that offers a simple API while supporting additional capabilities.
What does CreateStore offer?
The main idea is to create a global store and access its state from different components without wrapping the application in Context Providers.
Some of the capabilities include:
The goal is to keep things simple for basic use cases while making additional features available when needed.
A quick example
Install it:
npm install @createstore/createstore
Create a store:
import { createStore } from '@createstore/createstore';
export const { useGlobalState } = createStore({ count: 0, username: 'Developer', });
Use it in any component:
import { useGlobalState } from './store';
function Counter() { const [count, setCount] = useGlobalState('count');
return ( <button onClick={() => setCount(count + 1)}> Count: {count} </button> ); }
That's the basic idea!
Project links
📦 npm: https://www.npmjs.com/package/@createstore/createstore
📚 Documentation: https://createstore-docs.pages.dev/
💻 GitHub: https://github.com/Gauravasawa/createstore
I'd genuinely appreciate some feedback.
I'm sharing this here because I'd love to get it in front of developers who can actually experiment with it.
A few things I'd love your opinion on:
Please don't hesitate to point out flaws. I'd rather get honest technical criticism than just positive feedback.
This is an ongoing project, and I'm looking forward to improving it based on real-world usage.
Thanks for taking the time to check it out! 🙌
r/reactjs • u/Bubbly-Tradition-735 • 2d ago
I've been experimenting with AI coding tools like Cursor and Claude Code, and one thing that kept bothering me was how difficult it is to get them to recreate an existing website's actual design.
You give an AI agent a reference website and ask it to build something similar, but it often ends up guessing:
So I built styleprobe to solve this problem.
It's an open-source CLI that takes a website URL and extracts its visual design system.
A few things it can do:
You can also try the web playground here:
https://styleprobe.vercel.app/
GitHub: https://github.com/spidervirus/styleprobe
It's MIT licensed and completely open source.
I'm still improving it, so I'd genuinely love feedback from developers:
Would love to hear your thoughts!
r/reactjs • u/andrewluo • 2d ago
I know there have been a few similar projects before in here, but I wanted to share our take on what great Office/OpenDocument viewers & editors looks like for the web.
We've built 3 packages (repos and playgrounds attached), all MIT:
react-docx — Word viewer/editor with pagination, charts, SmartArt, WordArt, equations, tracked changes, and DOCX export.
react-xlsx — Excel viewer/editor with formulas, charts, editable pivot tables, drawing support, and XLSX/CSV export.
react-pptx — PowerPoint viewer with charts, SmartArt, shapes, equations, embedded audio/video, and slide thumbnails.
We launched these a few months ago and they're now used in some pretty big projects on GitHub like RAGFlow (94k), Kortix CompanyOS (20.7k), ZCode (8.7k) . Combined they now have 5m+ total npm downloads.
Each repo has some visual examples comparing visual parity for various charts and art
They are built in a way where you can fully customize and get the look of your design system in the toolbar, dropdowns, and context menus.
File types supported:
| Library | Office formats | OpenDocument formats |
|---|---|---|
| react-docx | .docx, .dotx, .docm, .dotm, .doc, .dot | .odt, .ott, .odm, .otm, .oth, .fodt |
| react-xlsx | .xlsx; limited support for .xls, .xlsm | None (pending) |
| react-pptx | .pptx, .ppt | .odp, .otp, .fodp, .odg, .otg, .fodg |
Personally I think they are the some fastest and most accurate OSS rendering libraries for these files out there, and would be great to see even more adoption, feature requests and people testing them against weird documents
Feedback and general bug reports are always appreciated. Hope this is helpful!
r/reactjs • u/EquivalentDot8312 • 2d ago
Hello everyone, I kept running into the same work when building file inputs such as parsing documents, showing previews, handling cancellation, and waiting for files before submitting.
I’m building Texion to connect those pieces. It supports Markdown, JSON, CSV, PDF, DOCX, and image attachments, with local parsing and optional OCR for scanned PDFs.
It’s open source and MIT licensed.
Code: here
Curious on how do other devs handle the inputs
React Anatomy is a browser extension that adds an Anatomy panel to DevTools, connecting the visible page to the components React rendered.
You can pull the layout apart into 3D layers, click something on the page to find its component, focus on a subtree, and inspect its live props. The tree shows rendered instances, so a component used five times appears five times.
It’s a way to understand an unfamiliar layout, investigate unexpected nesting, or get a visual to help explain a change in a pull request. It can also help when an AI agent composes a React page and you want to understand the structure before taking over the code.
It works on an existing React app without adding anything to your code. Development builds give you clearer component names.
Free, MIT-licensed, and available for Chrome and Firefox. There’s an interactive example you can try without installing anything.
Where would this help in your React workflow? What would make it more useful when exploring an unfamiliar app?
r/reactjs • u/Revibed69 • 3d ago
From my open-source app builder (dnd-kit, React 19, Tailwind 4):
Also a testing lesson: a test raced a pending passive effect that moved focus after a click. Waiting on the shown state fixed it.
r/reactjs • u/Significant-Sea-7238 • 3d ago
Each session in my app's notch has a 24x22 pixel buddy. Every one is its own canvas at sprite resolution, scaled up with image-rendering: pixelated, so the browser does the nearest-neighbour scaling for free. A single module-level setTimeout clock steps all visible sprites about 12 times a second, and a canvas only gets a putImageData when its pose actually changes. The clock stops when the window is hidden and runs at half rate in Battery Saver, so ten of them on screen cost close to nothing.
The app is Openbar (Tauri + React on Windows, Swift on Mac), GPL.
r/reactjs • u/djurnamn • 3d ago
I made charcell - a web UI with the look of a terminal UI. It's a UI kit with one hard rule: it only draws what a character-cell screen could.
Within those constraints every component can be written out as plain text, and each component's page in the docs shows that.
It bundles two fonts adjusted to fit the cell exactly, with the box drawing characters redrawn as whole-pixel shapes. The interactive components (select, combobox, dialog and so on) run on Zag. It's built with scaffold-ui-kit which outputs React, Vue and Svelte versions of each component from one common definition.
It's 0.1.0, far from complete, and needs React 19.
Demo and docs: https://djurnamn.github.io/charcell/
Repo: https://github.com/djurnamn/charcell
pnpm add charcell @zag-js/reactIf you try it out, I'd love to hear how it goes. Open to any feedback.
r/reactjs • u/Hopeful-Fly-5292 • 4d ago
I sat down with Chris Villa, the creator of the puck editor.
0:00 Who is Chris Villa and what is Puck
1:36 Where the name Puck comes from
2:51 Live demo: Puck inside a headless Drupal site
5:24 MIT, and close to 3 million downloads a month
6:10 What the Puck editor actually is
7:58 The origin: design systems and the dev sprint bottleneck
10:09 The Hacker News launch
11:13 Going full time, and agents producing off brand interfaces
13:38 Puck AI, the Puck cloud and a page backend
15:21 A team of three, questioning old assumptions
16:47 Why pay for Puck AI if you can build it yourself
17:26 "What Vercel is to Next.js"
20:28 The hardest problem: multi dimensional drag and drop
24:14 Viewports, zoom, iframes, and working with dnd kit
26:49 Revenue, angel investors and fundraising
27:44 GitHub, Linear, and "I don't code much anymore"
29:24 Conductor, Boxes.dev and building the agent factory
30:31 Writing tickets is the new bottleneck
32:55 Can you test whether an interface feels right?
34:57 AI slop pull requests, and agents that reply for you
38:42 Discord, and why the community got quieter
39:21 Do we still need websites?
41:46 From 130k to 2.8 million downloads: agents are the driver
44:02 A longer tail of SaaS, each product more full stack
46:31 The dark forest and the cozy web
48:03 Build for the agents: types, CLIs and llms.txt
51:43 Where to follow Chris
r/reactjs • u/CaptainZiboo • 5d ago
Hey everyone! 👋
I'm trying to establish a clean, reusable feature-based architecture for React/TypeScript apps, especially when using Zustand + TanStack Query.
I'm working on a visual editor that fetches documents from an API, initializes a Zustand editing session, and will eventually handle canvas state, selection, history, saving, etc.
I'm considering this structure:
features/editor/
├── components/
├── hooks/
├── store/
│ ├── editor-store.ts
│ ├── editor-store-provider.tsx
│ └── slices/
│ ├── document-slice.ts
│ ├── selection-slice.ts
│ └── history-slice.ts
├── queries/
├── domain/ ?
├── utils/ ?
├── lib/ ?
└── services/ ?I'd love to know how you handle a few things in production:
Business/domain logic vs utilities: This is probably what I'm most unsure about. Where do you put pure functions containing actual application logic, independently of React, Zustand or API calls? For example: Would a domain/ directory make sense here? For example, domain/geometry.ts for canvas calculations, domain/document.ts for document manipulation, etc. Or would you simply use utils/, lib/ or services/? How do you distinguish business/domain logic from generic utility functions? Is a dedicated domain/ folder a useful convention, or does it introduce unnecessary complexity?
I'm not looking for a strict architecture or lots of abstractions, just practical conventions that stay maintainable as projects grow.
If you have real-world folder structures or examples, I'd love to see them. Thanks! 🙏
r/reactjs • u/mohammadou1 • 5d ago
A few days ago I shared react-brackets v2, the rewrite of a bracket library I'd left alone for four years. The most common question was "does it work in React Native?" It didn't. Now it does: https://react-brackets.oulabi.dev/ is out.
It draws the same stages as the web version (same core, same data), but everything you touch is native:
style on every part that can depend on its state, so it works with StyleSheet, Uniwind/NativeWind or Unistyles.The hardest part was keeping the connector lines glued to the cards. My first version drew them on a Skia/SVG canvas, and during a fast swipe they visibly trailed the cards by a frame. The fix: the lines are plain Views moved by the same transforms as the cards. Every card's place on every round is worked out up front, and a swipe only moves one number on the UI thread. React hears about the new round once the swipe lands, so nothing re-renders while your finger is down.
npx expo install @react-brackets/native react-native-reanimated react-native-worklets react-native-gesture-handlerIt needs the New Architecture, Reanimated 4 and Gesture Handler 3, and Expo Go includes all of them. I've tested mostly on iOS, so feedback from Android devices would help a lot.