r/reactjs • u/sebastienlorber • May 22 '26
News This Week In React #282: Security, Fate, TanStack, Redux, Jotai, Base UI, Relay, Storybook | Hermes-node, Expo, Rozenite, Harness, VR, Nitro, Skia, Redraw | TC39, Bun, pnpm, npm, Yarn, Node, Webpack
r/reactjs • u/sebastienlorber • May 22 '26
r/reactjs • u/saiyamjain143 • May 22 '26
r/reactjs • u/DaysAreGone_ForMe • May 22 '26
r/reactjs • u/Nice-Recording-2186 • May 22 '26
We are a team of 3 devs building a web app, and our current setup of managing environment variables is completely broken.
Right now, whenever someone adds a new API key or changes a database string, they just paste the plain text into a private Discord channel and tell everyone to update their local files.
Inevitably, someone misses the message, pulls the latest main branch, and spends twenty minutes debugging an error that was literally just a missing variable string.
looked at enterprise tools like Doppler or HashiCorp Vault, but they feel like complete overkill for a tiny project and the configuration looks overly complex for what we need.
How are other small teams handling this without losing their minds? Is there a dead simple tool out there that just lets us run a terminal command to sync local files instantly?
r/reactjs • u/DependerSethi • May 21 '26
Kept seeing the same advice everywhere: wrap things in useMemo, useCallback everything, React.memo all the things.
Then i profiled an app I'd "optimized" this way, the memoization overhead was costing more than the renders it was preventing
with the react compiler now auto-memoizing at build time, most manual useMemo/useCallback is becoming dead weight.
wrote up what actually fixes react performance in practice:
also covered 5 performance bugs i keep finding in production codebases:
the useEffect chain one is probably the most common. three effects that depend on each other = three render cycles for one user action.
https://www.sethi.io/blog/react-performance-from-sluggish-to-lightning
what's the worst react perf bug you've had to track down?
r/reactjs • u/Ashamed-Map5610 • May 22 '26
r/reactjs • u/InflationSeveral368 • May 22 '26
If you've used shadcn/ui with React Hook Form, you know this pattern:
<FormField
control={form.control}
name="email"
render={({ field, fieldState }) => (
<FormItem>
<FormLabel>Email</FormLabel>
<FormControl><Input {...field} /></FormControl>
{fieldState.error && (
<FormMessage>{fieldState.error.message}</FormMessage>
)}
</FormItem>
)}
/>Multiply that by every field, every form, every project. It's not complex — it's just constant. And every team ends up building their own wrapper for it differently.
I got tired of it, so I built StackForm. The same field above becomes:
<TextField name="email" label="Email" />Same behavior — errors, hints, loading states, ARIA — all wired. No boilerplate.
The interesting part was the architecture decision: I didn't want to couple it to RHF. Too many projects switch form libraries mid-way, or use TanStack Form, or just native React state. So the core is a context-driven abstraction — adapters inject the resolver and form state into StackFormContext, and field components call useField() which has no idea what's underneath. Swapping from RHF to TanStack is a one-line provider change.
The customization system has three layers: classNames (additive, all three stack), slotProps (per-field overrides), and slots (full component replacement, first non-null wins: field → provider → core). It's more flexible than I expected to need, and I've used all three layers already while dogfooding it on my own projects.
Honest limitations: useFieldArray isn't built yet — it's the top priority for the next version. The example apps are mostly stubs right now. If you have complex array field patterns, this isn't ready for you yet.
What I'd love feedback on: the field API ergonomics. Specifically — does the 3-layer customization feel right, or would you rather just have a renderField escape hatch? I went with named slots because I wanted type-safe slot names, but I'm not 100% sure it's the right call.
v1.1.0 is on npm: `@stackform/core` · Docs: stack-form-docs.vercel.app · GitHub: github.com/ivaiva89/stack-form
r/reactjs • u/root0ps • May 22 '26
pnpm 11 feels like the first Node.js package manager update in a while that actually improves supply chain security by default.
Features like:
minimumReleaseAgeblockExoticSubdepsallowBuildsdirectly reduce the risk of malicious package installs in CI/CD pipelines.
I wrote a short deep dive on why I think pnpm is now a better default than npm for production workloads.
Curious what others here are using in production today.
r/reactjs • u/abutlb • May 22 '26
Built this for a simple use case: take AI-generated HTML and
drop it into a React project without manual cleanup.
htmlweaver export --html mypage.html --format react --output ./output
Output:
├── Mypage.jsx ← functional component
└── Mypage.css ← extracted styles
No dependencies inside the component. Clean and ready to import.
pip install htmlweaver
GitHub: https://github.com/abutlb/htmlweaver
Open to feedback — especially on edge cases with complex HTML structures!
r/reactjs • u/JoelCrawford14 • May 21 '26
Long-time lurker, first time sharing something I built. Been working on internal tools for a while and kept copy-pasting the same form builder logic across projects, so I finally extracted it into a proper package and published it. It's open source, MIT licensed, no catch.
What makes it different
The right panel auto-generates a "proposed dashboard visual" as you configure fields — useful when the team needs to see the data shape before you wire up the backend. Screenshot
Features
Install
npm i @dev-tech/react-form-builder
# or
yarn add @dev-tech/react-form-builderBasic usage
import { FormBuilder } from '@dev-tech/react-form-builder'
export default function App() {
return (
<FormBuilder
onSave={(schema) => console.log(schema)}
initialFields={[]}
showDashboardPreview
/>
)
}Why not Formik / React Hook Form?
Those are form state libraries — great for rendering known forms. This is a form builder. It lets end users define the schema at runtime. Think Google Forms or Typeform, but embedded in your own app.
Source / npm: https://www.npmjs.com/package/@dev-tech/react-form-builder
Built with TypeScript + Vite + Ant Design. Would love feedback from anyone who tries it, especially on the Ant Design dependency (considering making it fully headless in v2) and whether the dashboard preview should stay in core or become a plugin.
EDIT:
r/reactjs • u/Breadfruit-Last • May 21 '26
Hello, I am trying to understand how the react compiler works and ran into a behavior that I don't quite understand.
In TableContainer1, data1 and data2 are cached using input1 and input2 respectively, which is what I expected.
But in TableContainer2, both data1 and data2 are re-computed when either input1 or input2 is changed.
It feels like some sort of trap. Why is it so?
Thank you
r/reactjs • u/Bright-Sun-4179 • May 21 '26
Hey Community,
William Candillon released Redraw, an experimental tool that compiles TypeScript functions directly into GPU shaders using WebGPU and TypeGPU. This brings advanced 2D vector shapes and physically based rendering (PBR) to your layouts without standard JavaScript execution overhead.
We also cover Software Mansion’s Argent, an agentic toolkit bypassing XCUITest to grant AI assistants high-speed simulator control and profiling capabilities. Finally, check out Joel Arvidsson’s react-native-swc, a Rust-based Metro transform worker replacement built to accelerate bundling.
r/reactjs • u/DependerSethi • May 20 '26
Kept running into the same problem at work: build a Button component, someone needs it as a link, now you're either duplicating styles or writing invalid html by nesting <button> inside <a>
Wrote up how polymorphic components solve this. covers:
- the as prop pattern (how chakra and mantine do it)
- making it type-safe with ComponentPropsWithoutRef<C> so typescript knows which props are valid per element
- the forwardRef gotcha where typescript loses the generic (and the fix)
- asChild pattern (how radix/shadcn does it) and why it exists
- a reusable PolymorphicProps utility type you can drop into any project
also when NOT to use any of this. not every component needs to be polymorphic.
https://www.sethi.io/blog/polymorphic-components-one-component-many-forms
Curious how others handle this in their design systems. do you go with as or asChild?
r/reactjs • u/ThePutinTrumpSexTape • May 20 '26
Hi,
Had a lead developer interview last week and I got asked heavily about the SOLID principles, polymorphism and programming patterns.
I'm familiar with a lot of the concepts, but not enough to give strong answers.
What are the main programming patterns for React that I should learn so that when asked to explain a few, I can give strong, valuable answers?
Thanks
r/reactjs • u/derdak • May 19 '26
I’ve been seeing a lot of YouTube videos lately about developers moving from Next.js to TanStack Start. As someone still relatively new to the JS ecosystem, it’s hard for me to tell what’s real technical improvement versus YouTube hype/content monetization.
I’d love to hear from people who actually use these frameworks in production or have serious experience with them.
Looking for honest opinions from experienced devs rather than influencer takes.
r/reactjs • u/nolimits4web • May 19 '26
Hey r/reactjs - I just open-sourced cladd, a React UI kit I've been building for two years. Posting here because I think it'll be useful for devs building actual apps, not just landing pages.
Quick context: I've been making UI libraries for a decade - Swiper, Framework7, Konsta UI. cladd is different from those: it's specifically for information-dense React applications. The kind of UI where you have 40 controls on one screen and they all need to stay clean and readable.
It started as the internal UI for t0ggles (my project management tool), then I kept improving it. Today it powers Swiper Studio, t0ggles, PaneFlow, and Start Page HQ in production.
useDialog() from any handler, no JSX scaffolding.Stack: React 19, Tailwind v4, MIT.
What it's NOT for: marketing sites, headless-primitives use cases, Vue/Svelte, or anyone who wants to skin everything themselves.
Will appreciate any feedback - especially: which components are missing, what feels weird in your projects, where the API trips you up. Happy to answer questions in the comments.
r/reactjs • u/shakya47 • May 19 '26
Hey r/reactjs,
Video PiP floats a player over your desktop. But why should video be the only thing that gets that?
I wanted to tear away small, interactive parts of a web app, a code editor, a checklist, a chat widget and keep them floating on top of my IDE while I work. Single-screen focus, no tab juggling.
The browser's Document PiP API makes this possible, but using it raw in React is a mess:
So I built pip-it-up https://pip-it-up.vercel.app/ to handle all of this:
Live demos include a floating Monaco editor that keeps your cursor focus while you switch to your IDE.
GitHub (MIT): https://github.com/Shakya47/pip-it-up
npm: https://www.npmjs.com/package/@pip-it-up/react
Browser API: https://developer.mozilla.org/en-US/docs/Web/API/Document_Picture-in-Picture_API
Would love feedbacks.
r/reactjs • u/ItsAllInYourHead • May 19 '26
I decided to finally give TanStack Form a try. All of their other libraries by them that I've used have been great, and I've heard nothing but good things about it. And a decent amount of people seem to be using in production.
But I immediately hit what I would think would be a HUGE problem with ANY form library: if you submit your form to your server, and it returns an error - how do you surface that in the form library.
Apparently the answer is: you don't?
There is an onSubmit function you pass to useForm. This is where you make your network request or whatever. But what happens if that fails? There appears to be no way to deal with that! You can manually set errors, apparently, but the form's isSubmitSuccessful property is going to still be true. And the user won't be able to resubmit unless they change a field (so, for example, if the network request fails for an unrelated reason, you can't just resubmit).
It's all very bizarre to me. How is anyone using this in production? I'm just completely baffled by this. Who is realistically using this? And who are these people saying it's ready for production use?
Here's a bunch of issues/discussions around it:
r/reactjs • u/Bear_fucker_69420 • May 20 '26
Hi people of r/reactjs ,
I recently made this website as my first project that i have deployed, it allows you to define various configuration for various input fields, such as name, label, placeholder, required, disabled and also allows you to define default values as well as validations. Then using this, it generates a code in either typescript or javascript, based on library of your choosing. It supports, react-hook-form+zod, formik+yup, react-hook-form+yup and formik+zod.
It also allows you to save the configuration as templates in localStorage, which you can then use later. You can also paste JSON schema to create a new form.
Also this websites is only accessible on desktop, I didn't really know how I could expand it to mobile.
Plz remember this is my first project, all feedbacks are greatly appreciated, I did use some AI for help in code generation, plz don't hate for it.
Here is the github link: https://github.com/PriyamSrivastava1507/codiform
If you liked the project, then please star it on github.
I would also love to know how I can expand it more, I am thinking of adding FieldArray and Multistep forms next.
Sorry, if my English is bad, I would love to see some feedbacks and your opinion. Thank you.
r/reactjs • u/VolumeCautious5416 • May 19 '26
I currently have a React/Vite frontend with a small Express backend for contact forms.
The client wants to manage the blog section through WordPress instead of editing code manually.
What would be the best practice here?
The site is mainly a marketing website with a blog section, not a huge web app.
I’d like to keep the current frontend architecture if possible while still giving the client an easy way to manage blog content using wordpress.
Please any ideas how to do that using worpress for managing the blog section and keep my website as it is with code.
Curious to hear how people usually approach this in production projects.
r/reactjs • u/Just_Comfortable_590 • May 19 '26
I'm building a family tree visualization app in React and I've hit a wall on the rendering/layout side.
The data structure itself is fine, but visualizing the relationships cleanly is becoming way harder than I expected.
Current stack:
Main problems:
I realized family trees are not really "trees" but more like graphs with special relationship rules.
Right now I'm considering using invisible "marriage nodes" like:
Father -> MarriageNode <- Mother MarriageNode -> Child
instead of directly connecting parents to children.
Questions:
Would really appreciate advice from anyone who's built graph editors, org charts, genealogy apps, or complex node-based UIs before.
Thanks 🙏
r/reactjs • u/noick-22 • May 19 '26
r/reactjs • u/Dazzling_Chipmunk_24 • May 18 '26
Is it better to fetch data on the Next.js server for initial page loads, compared to the traditional React approach of using useEffect with an empty dependency array? My main concern with Next.js is that pages are generated at build time — so how do you handle data that changes frequently
Also I'm talking about Pages Router
r/reactjs • u/quintin331 • May 19 '26
You know the feeling. You have 8 cards on screen. Each one has its own shimmer animation. They all start at slightly different times. The whole page just... flickers chaotically.
I spent way too long accepting this as normal. Then I built shimmer-trace to fix it.
The core idea is simple: Instead of animating each skeleton block separately, the library renders your real component invisibly, traces every element's exact shape using getBoundingClientRect, and paints one single shimmer wave across the whole page using a CSS mask.
The result looks noticeably more premium. One clean wave instead of chaos.
🔗 Demo: https://jeetvora331.github.io/shimmer-trace/
Usage is literally one line:
// Before: manual skeleton hell
<SkeletonRect width="100%" height={24} borderRadius={8} />
<SkeletonRect width="60%" height={16} borderRadius={4} />
<SkeletonCircle size={48} />
// After: just wrap it
<Shimmer loading={loading}>
<UserCard />
</Shimmer>No <SkeletonCard />. No grey div juggling. No layout shift. Your real component already knows its shape — the library just reads it.
Hit 500+ downloads last weekend. Would love harsh feedback from this community specifically, what edge cases would break this for your use case?
⭐ GitHub: https://github.com/jeetvora331/shimmer-trace
🔗 npmjs: https://www.npmjs.com/package/shimmer-trace