r/react • u/Awkward-Let-4628 • 22h ago
r/react • u/Significant-Sea-7238 • 23h ago
OC Width and height on separate springs: how I matched SwiftUI's notch animation in React
The Windows version of my notch app is React + Tauri, and it had to move like the SwiftUI original. I wrote SwiftUI's spring (duration + bounce) as a plain function of time, gave width and height their own springs, and only let a growing side overshoot, capped at 12 px.
The code, with tests: https://github.com/MF-DEEV/Openbar/blob/main/windows/src/island/motion.ts
The app is Openbar, a notch-style island for AI coding agents. Free and open source.
r/react • u/OnARockSomewhere • 1d ago
Project / Code Review use-places-autocomplete fails on new Google Cloud projects, so I wrote a hook on Places API (New)
If you’ve set up Places autocomplete on a new Google Cloud project lately, you may have run into LegacyApiNotActivatedMapError. The legacy Places API, which AutocompleteService calls, is hidden from new projects and left out of new API keys, and Google says it can no longer be enabled for new projects. use-places-autocomplete and react-places-autocomplete both still depend on it.
So I wrote google-places-autocomplete-hook. It:
- runs on
AutocompleteSuggestion(Places API (New)) - keeps one session token per search and ends it with the details call, so typing plus the pick is billed as one session, without you touching tokens
- debounces, and drops responses that come back out of order
- is headless: you render the input and the list
- works with React 16.8 to 19 and server rendering, with no dependencies
- has a
/compatentry that returns use-places-autocomplete’s shape, so moving over is an import change
Demo: https://ninadsutrave.github.io/google-places-autocomplete-hook/
It runs against Google with your own key. Google’s free Maps Demo Key works and needs no billing; the page shows how to get one. It also logs every request the hook sends and which session it belongs to.
Repo: https://github.com/ninadsutrave/google-places-autocomplete-hook
npm: https://www.npmjs.com/package/google-places-autocomplete-hook
What’s missing for your use case?
r/react • u/Eddyter_Ai • 2d ago
General Discussion We built an AI-powered rich text editor for React & Next.js — would love your feedback
Hey devs! 👋
Building a rich text editor from scratch can be frustrating, especially when you need formatting, customization, and AI-powered features.
That's why we've been working on Eddyter, a rich text editor designed for React and Next.js applications.
Here's what we're focusing on:
- ⚡ Easy integration with React & Next.js
- 🤖 AI-powered writing and editing
- 🧩 Extensible and customizable components
- 💻 A developer-friendly editing experience
Our goal is to help developers spend less time building editor functionality and more time building their actual products.
🔗 Check it out: https://eddyter.com
I'd genuinely love to hear your thoughts:
What is the biggest challenge you've faced when integrating a rich text editor into a React application?
Feedback, suggestions, and criticism are all welcome!
r/react • u/Key-Error-6441 • 3d ago
OC We open-sourced our studio's React component library (76 components, Base UI + Tailwind v4, MIT)
r/react • u/Obvious_Fennel7602 • 2d ago
General Discussion I think we’ve overcomplicated frontend development — and AI is exposing it
I’ve been building React/Next.js applications for years, and something has been bothering me lately.
A lot of frontend projects are becoming *more* complicated while the actual product is getting simpler.
You’ll see:
\- 10+ state-management patterns
\- multiple data-fetching abstractions
\- enormous component libraries
\- custom hooks wrapping custom hooks
\- “generic” components that nobody wants to touch
\- dozens of folders trying to enforce an architecture
\- AI-generated code adding even more layers
And then a developer gets asked to change a button, modify a form, or add one API field… and suddenly they need to understand half the application.
The irony is that AI coding tools are making this easier to create.
You can ask an AI:
“Build a scalable architecture for this feature.”
And it will happily give you 15 abstractions.
The code looks sophisticated.
The architecture diagram looks impressive.
But six months later, someone has to maintain it.
I’m starting to think the better question isn't:
**“How do we make our frontend architecture more scalable?”**
It’s:
**“How little architecture can we get away with while keeping the product maintainable?”**
For example, I’d rather have:
Feature
├── UI
├── API/data
├── state
└── tests
than create a massive abstraction layer just because we *might* need it someday.
And I’m increasingly applying the same thinking to AI-generated code:
**If I wouldn't ask a human developer to write this abstraction prematurely, I shouldn't ask an AI to write it either.**
Curious what other experienced developers are seeing.
**Has AI made your codebase simpler because you can automate the boring parts — or more complicated because it makes overengineering ridiculously easy?**
I'd particularly like to hear from people maintaining React/Next.js codebases that are 2–5+ years old.
r/react • u/GhostInVice • 3d ago
Project / Code Review GTA VI Countdown – Interactive 3D Globe & World Map
Hey!
I've added a new page to ViceHype where you can follow the GTA VI countdown across 40 cities using an interactive globe or a world map.
You can check your local countdown, see which city is next and watch the globe fill up with GTA VI covers as each city reaches midnight.
r/react • u/Goldziher • 4d ago
OC Skif 0.9 for React monorepos: finding unused components across packages
I maintain Skif, an open-source linter for JavaScript and TypeScript monorepos. One use case is cleaning up a shared React component package after a migration. A component can disappear from every screen but still be re-exported through packages/ui/src/index.ts. Checking local imports in the component file won't tell you whether any app still reaches that export.
Skif builds a module graph across the workspace and reports unused files and exports. The distinction matters for shared UI packages: an unused export can point to a legacy component, while an unused file can point to an entire module that no entry point reaches. I’d review findings before deleting public exports or components loaded by conventions the tool may not see.
In 0.9, the disk cache is on by default, so repeated runs can reuse parse results for unchanged files. Skif reads tool configuration statically. If it can’t read a package’s config, it flags that package as incomplete in the report. If you already use Knip, npx @polylint/skif migrate --dry-run previews the corresponding config.
I’d especially like examples of React entry points that are easy to miss with static analysis. If you use lazy routes, Storybook stories, or a shared library with multiple public entry points, what would you expect the linter to treat as in use?
r/react • u/Accurate-Screen8774 • 5d ago
Portfolio A React-like JS Framework with Web Components
IMPORTANT DISCLAIMER: This is my own project. Im am using AI, so lets get that out of the way... its the key reason for why YOU SHOULD NOT USE IT. Im not trying to promote "yet another ui framework", this is an investigation to see what is possible. Its unreviewed, unaudited and far from finished. Nobody else should be using this. This framework is intended for myself on my own projects. It is provided open-source for transparency, testing and demo purposes. Feel free to reach out for clarity if you have any questions.
Im was investigating an idea i had about JSX-like syntax for webcomponents after some experience with Lit. I am sharing this here because it might be interesting/educational.
Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components. It can support React with a wrapper, buts React is fundamentally an abstraction away from the DOM.
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. I made a start by creating some basic reusable ui components components to be built with the js framework. Aiming for something like Material UI.
I can then compound that slop into some basic UI demos:
The disclaimer above is always worth repeating. Im aiming for a post like this to be like "building in public". If interesting to anyone, i hope its inviting to take a look. It's hard to determine if / when its a good time to share, so best to get it out there sooner for any outstanding issues i may be overlooking.
r/react • u/127001-sweet-127001 • 6d ago
Project / Code Review A shared React component can still depend on your checkout context through a hook
This is the dependency path I mean:
shared/ui/CartBadge.tsx
-> shared/hooks/useCartCount.ts
-> features/checkout/CartContext.tsxThe component looks reusable. It renders a count, and the state access is neatly tucked away in a custom hook. But moving that hook into shared hasn't removed the dependency on checkout.
Easy to miss in a component review
In ArchUnitTS, my open-source architecture testing library, you can pull out that component's import graph:
import { projectGraph } from 'archunit';
const graph = projectGraph('tsconfig.json')
.reachableFrom('src/shared/ui/CartBadge.tsx');
await graph.exportAsHTML('reports/cart-badge.html');For that direct-import chain, the view reaches through the hook to the context file. Unrelated components stay out of it.
If the badge is supposed to be shared UI, one way to separate it is to have a checkout-owned wrapper read the context and pass count to the badge. The shared component then has no import path back to checkout, while the feature still owns how the count is calculated. You can also keep a boundary test that rejects imports from shared into features, so the coupling doesn't creep back through the next hook.
This follows source imports. It doesn't tell you which provider is present at runtime, whether a component will render correctly in Storybook, or what ends up in a bundle.
Code and docs. Available as archunit on npm; this example uses 2.5.5.
r/react • u/Substantial_Load_690 • 7d ago
General Discussion Samestate: see your site on every screen at once, with clicks synced across devices
r/react • u/zorro_mia • 7d ago
Project / Code Review Love to hear your thoughts on my component library
r/react • u/trickitycunt • 7d ago
General Discussion Mocks to Component Diagram to Implementation
I have got mocks from my design team. I need to undertake the task of implementing the mocks. What's the usual way to plan things well? Can we create component diagram, data flow etc? My aim is mocks -> architecture diagrams -> commom components/data flow mapped -> stories/tasks
Are there any examples or references that I could look up?
r/react • u/EquivalentDot8312 • 8d ago
Project / Code Review Building a One React input for text and attachments, all in one lifecycle.
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?
r/react • u/ArmNo4115 • 8d ago
Project / Code Review I built my own React state management library – CreateStore. Would love some honest feedback!
reddit.comr/react • u/Live-Head2724 • 9d ago
Portfolio I was going to say "I have zero coding background" for the algorithm, but unfortunately, I do 😅 Here is a scene I've been working on!
Hey everyone,
I’ve been building this scene over the last few days and wanted to share a quick preview with you all.
Here is the stack I used to put this together:
- Visuals & Framework: Three.js (R3F), Blender, and Mixamo
- AI Assist: MCP, Claude Opus 5.5, and Fable 5.2 (Sametime Blender MCP)
- Audio: ElevenLabs
Note: The character voices in this clip are currently in Turkish, but I will be adding full English translations and voiceovers very soon!
I’m planning to share more scenes and updates as development continues. I'd love to hear your feedback or answer any questions about the workflow!
OC React Anatomy: See how your layouts are composed in an exploded 3D view
React Anatomy is a browser extension that adds an Anatomy panel to DevTools, connecting the visible page to the components React rendered.
- Demo and docs: https://react-anatomy.com
- Source: https://github.com/charpeni/react-anatomy
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/react • u/PimoluUI • 9d ago
Project / Code Review I made a headset product page using my open-source React UI library
Hey everyone! 👋
I wanted to share Pimolu Headset, a new product page showcase created with Pimolu UI, my open-source React component library.
The idea was to explore how reusable UI components can come together to create a complete product-focused interface.
I'd love to hear your thoughts on the design and what you think could be improved!
Live demo: https://pimolu-headset.pimolu.com/
Pimolu UI: https://pimolu.com
r/react • u/mrGorynx • 9d ago
General Discussion Trying to understand how to properly optimize larger React Three Fiber scenes
reddit.comr/react • u/No_Editor9420 • 10d ago
Portfolio I built an <Avatar seed={email} /> that renders the same bytes in RSC and the browser (React 18+)
galleryMost users never upload a photo, so most member lists are a column of identical grey circles. I wanted every user to get a recognizable face from just their email, without hydration warnings.
The React-specific part: SVG gradients need IDs. If two avatars share an ID, the second shows the first one's colors. If the server and client invent different IDs, you get a hydration mismatch. The wrapper takes the instance suffix from `useId()`, which matches on server and client, and adds a hash of the seed and options. That's also why the floor is React 18: it's the first version with `useId`. 1.1.2 just widened the peer range to `>=18`.
import { Avatar, AvatarGroup } from '@inlaylab/opaline-react'
import { clay } from '@inlaylab/opaline/clay'
<Avatar seed={user.email} look={clay} src={user.photo} alt={user.name} />
<AvatarGroup look={clay} members={team.map((u) => u.email)} max={4} />Why you might use it: it works in Server Components, and you don't add `'use client'` (the photo fallback ships its own small client boundary). If `src` is missing or broken, the face stays. Colors are CSS variables, so dark mode doesn't re-render. The React wrapper is 854 B on top of a 1.27 kB core, with no dependencies. Code and art are MIT.
Proof: a Next App Router sample app is hydrated in Playwright. The test fails on any hydration warning and diffs the hydrated DOM against the server HTML.
Playground: https://inlaylab.github.io/Opaline/playground/
Repo: https://github.com/Inlaylab/Opaline
What would stop you from dropping this into a real app?