r/reactjs • • Mar 15 '26

Meta Announcement: Requesting Community Feedback on Sub Content Changes

26 Upvotes

We've had multiple complaints lately about the rapid decline in post quality for this sub.

We're opening up this thread to discuss some potential planned changes to our posting rules, with a goal of making the sub more useful.

Mod Background

Hi! I'm acemarke. I've been the only fully active mod for /r/reactjs for a few years now. I'm also a long-standing admin of the Reactiflux Discord, the primary Redux maintainer, and general answerer of questions around React and its ecosystem.

You don't see most of the work I do, because most of it is nuking posts that are either obvious spam / low quality / off-topic.

I also do this in my spare time. I read this sub a lot anyways, so it's easy for me to just say "nope, goodbye", and remove posts. But also, I have a day job, something resembling a life, and definitely need sleep :) So there's only so much I can do in terms of skimming posts and trying to clean things up. Even more than that: as much as I have a well-deserved reputation for popping into threads when someone mentions Redux, I can only read so many threads myself due to time and potential interest.

/u/vcarl has also been a mod for the last couple years, but is less active.

What Content Should We Support?

The primary issue is: what posts and content qualifies as "on-topic" for /r/reactjs?.

We've generally tried to keep the sub focused on technical discussion of using React and its ecosystem. That includes discussions about React itself, libraries, tools, and more. And, since we build things with React, it naturally included people posting projects they'd built.

The various mods over the years have tried to put together guidelines on what qualifies as acceptable content, as seen in the sidebar. As seen in the current rules, our focus has been on behavior. We've tried to encourage civil and constructive discussion.

The actual rules on content currently are:

  • Demos should include source code
  • "Portfolios" are limited to Sundays
  • Posts should be from people, not just AI copy-paste
  • The sub is focused on technical discussions of React, not career topics
  • No commercial posts

But the line is so blurry here. Clearly a discussion of a React API or ecosystem library is on topic, and historically project posts have been too. But where's the line here? Should a first todo list be on-topic? An Instagram clone? Another personal project? Is it okay to post just the project live URL itself, or does it need to have a repo posted too? What about projects that aren't OSS? Where's the line between "here's a thing I made" and blatant abuse of the sub as a tool for self-promotion? We've already limited "portfolio posts" to Sundays - is it only a portfolio if the word "portfolio" is in the submission title? Does a random personal project count as a portfolio? Where do we draw these lines? What's actually valuable for this sub?

Meanwhile, there's also been constant repetition of the same questions. This occurs in every long-running community, all the way back to the days of the early Internet. It's why FAQ pages were invented. The same topics keep coming up, new users ask questions that have been asked dozens of times before. Just try searching for how many times "Context vs Redux vs Zustand vs Mobx" have been debated in /r/reactjs :)

Finally, there's basic code help questions. We previously had a monthly "Code Questions / Beginner's Thread", and tried to redirect direct "how do I make this code work?" questions there. That thread stopped getting any usage, so we stopped making it.

Current Problems

Moderation is fundamentally a numbers problem. There's only so many human moderators available, and moderation requires judgment calls, but those judgment calls require time and attention - far more time and attention than we have.

We've seen a massive uptick in project-related posts. Not surprising, giving the rise of AI and vibe-coding. It's great that people are building things. But seeing an endless flood of "I got tired of X, so I built $PROJECT" or "I built yet another $Y" posts has made the sub much lower-signal and less useful.

So, we either:

  • Blanket allow all project posts
  • Require all project posts to be approved first somehow
  • Auto-mod anything that looks like a project post
  • Or change how projects get posted

(Worth noting that we actually just made the Reactiflux Discord approval-only to join to cut down on spam as well, and are having similar discussions on what changes we should consider to make it a more valuable community and resource.)

Planned Changes

So far, here's what we've got in mind to improve the situation.

First, we've brought in /u/Krossfireo as an additional mod. They've been a longstanding mod in the Reactiflux Discord and have experience dealing with AutoMod-style tools.

Second: we plan to limit all app-style project posts to a weekly megathread. The intended guideline here is:

  • if it's something you would use while building an app, it stays main sub for now
  • if it's any kind of app you built, it goes in the megathread

We'll try putting this in place starting Sunday, March 22.

Community Feedback

We're looking for feedback on multiple things:

  • What kind of content should be on-topic for /r/reactjs? What would be most valuable to discuss and read?
  • Does the weekly megathread approach for organizing project-related posts seem like it will improve the quality of the sub?
  • What other improvements can we make to the sub? Rules, resources, etc

The flip side: We don't control what gets submitted! It's the community that submits posts and replies. If y'all want better content, write it and submit it! :) All we can do is try to weed out the spam and keep things on topic (and hopefully civilized).

The best thing the community can do is flag posts and comments with the "Report" tool. We do already have AutoMod set up to auto-remove any post or comment that has been flagged too many times. Y'all can help here :) Also, flagged items are visibly marked for us in the UI, so they stand out and give an indication that they should be looked at.

FWIW we're happy to discuss how we try to mod, what criteria we should have as a sub, and what our judgment is for particular posts.

It's a wild and crazy time to be a programmer. The programming world has always changed rapidly, and right now that pace of change is pretty dramatic :) Hopefully we can continue to find ways to keep /r/reactjs a useful community and resource!


r/reactjs • • Sep 10 '26

News React 19.3

Thumbnail
react.dev
173 Upvotes

r/reactjs • • 12h ago

Show /r/reactjs I built Native Form: Zero-registration, HTML-first form library for React (no {...register()} boilerplate)

17 Upvotes

Hey r/reactjs,

Like many of you, I've used React Hook Form and Formik across several production projects. While they're powerful, I always felt friction with how modern form libraries force you to treat standard HTML forms as legacy: - Having to manually register every input with refs: {...register("email")} - Wrapping UI components in custom controllers - Giant bundle sizes once you add schema resolvers and adapters

I wanted to see if we could go back to standard HTML5 forms as the single source of truth without sacrificing React ergonomics or type safety.

So I built Native Form: * GitHub: https://github.com/sunilsv26/native-form * npm: npm i @native-form/react

What makes it different?

  • Zero Input Registration: You write plain HTML inputs with standard name attributes (<input name="email" />). Native Form discovers them automatically from the DOM via MutationObserver.
  • Uncontrolled DOM-First Performance: Keystrokes don't trigger component re-renders. Your view only re-renders when form state (validation errors, submission status) actually changes.
  • Microscopic Schema Adapters: Adapters for Zod, Yup, and Valibot are under 500 bytes. The core runtime has zero third-party dependencies.
  • Built-in Multi-Step Memory: useWizard and preserveUnmountedValues: true keep your unmounted step values hydrated without complex state contexts.
  • Framework Agnostic Under the Hood: The core runtime (@native-form/core) runs in pure Vanilla JS, Vue, or Svelte, while @native-form/react provides React 18 & 19 hooks (useForm, useField, useWatch, useWizard).

Quick Example:

```tsx import { useForm } from "@native-form/react"; import { zodResolver } from "@native-form/zod"; import { z } from "zod";

const schema = z.object({ email: z.string().email(), age: z.number().min(18), });

export function Form() { const { formRef, formState } = useForm({ schema: zodResolver(schema), serializationMode: "typed", // automatically coerces type="number" and range to numbers onSubmit: (values) => console.log("Submitted:", values), });

return ( <form ref={formRef} noValidate> <input name="email" type="email" placeholder="Email" /> {formState.errors.email && <span>{formState.errors.email}</span>}

  <input name="age" type="number" placeholder="Age" />
  {formState.errors.age && <span>{formState.errors.age}</span>}

  <button type="submit" disabled={formState.submitting}>
    {formState.submitting ? "Submitting..." : "Submit"}
  </button>
</form>

); } ```

I recently released v0.1.2 with fixes for discrete controls, range sliders, and custom design system integration (like Material UI).

I'd love to hear your feedback on the architecture, API design, or any edge cases you'd like to see covered!


r/reactjs • • 17h ago

Discussion Senior devs: what’s the biggest React decision you made that you’d reverse today?

12 Upvotes

I have been thinking about this a lot lately. Most React content is about how to do things, but the decisions that really shape a project are the big early ones: architecture, state management, framework choice, rendering strategy.

And with React 19.x, the React Compiler, and Server Components all in the picture, a lot of us are now living with choices we made years ago.

So I’m curious about the experienced people here:

  • What was the biggest React/architecture decision you made that you would reverse if you could?
  • What did it cost you (time, performance, team confusion, rewrites)?
  • What did you learn, and what would you pick today instead?

r/reactjs • • 15h ago

Resource Show off: a history map with 1,600+ static pages from one Astro site and a single React island

2 Upvotes

WhoRuled is an interactive world-history map. Stack: Astro (static), one React island for the Canvas 2D map, TypeScript strict, deployed as static assets on Cloudflare, no backend. Facts live in CC0 JSON keyed by Wikidata QID, and a pipeline imports rulers from Wikipedia with source URL and quote. Every claim needs a source or the page isn't indexable.

Things I learned: preloading the two pixel fonts took CLS from 0.425 to 0.000, and the build generates 1,600+ SEO pages from the data. Repo: WhoRuled. Feedback welcome, especially on the data model.


r/reactjs • • 10h ago

Show /r/reactjs I built an open-source React library where an LLM designs the recommendation block and your catalog supplies the prices

0 Upvotes

This is my own project. rudra-js is an open-source TypeScript library (MIT) for React stores. A language model designs one product-recommendation block, the library checks it against your catalog, and React renders it.

The model never writes HTML or JSX. It returns a few fields: layout, headline, copy, which cards to highlight. Products are SKUs from the list you pass in. Titles, prices, images and links come from your catalog at render, and the model's text is rendered as escaped text. Each field also goes through wording checks, and a field that fails is dropped. They aren't airtight: rewordings and spelled-out numbers can get through.

It works as a Server Component, with renderToString, or client-rendered. Rendered on the server, the block is in the first HTML response with no client JS. React 18 or 19, Node 22.12+.

It also runs with no model, so the quick start needs no API key.

It's v0.8.3 and APIs may change before 1.0. I'd like feedback on the API shape and on what breaks in a real Next.js app.

https://github.com/clivedsouza1010/rudra-js


r/reactjs • • 1d ago

Resource I built a learning garden for understanding React internals and how Next.js works

4 Upvotes

​

Hey everyone!

I've been working on a learning garden where I write technical deep dives into frontend development, with a focus on understanding how things actually work under the hood rather than just learning APIs.

Currently, it has three main learning paths:

- How React Works — Understanding React's behavior from the ground up.

- React Internals — A source-level tour of React 19, from "createRoot", lanes, and fibers to hooks, the commit phase, and the React Compiler.

- Next.js in Practice — Exploring Next.js concepts and how they work in real applications.

My goal is to make these topics easier to understand by connecting the underlying implementation to what we experience as developers.

I'm particularly interested in the details that are easy to overlook when building applications every day: how updates are scheduled, what happens between a state change and a DOM update, and why the framework behaves the way it does.

You can check it out here: https://garden.drhexe.ir

I'd genuinely appreciate feedback, especially on the technical accuracy, depth of the explanations, and what you'd like to see covered next.

If you're interested in React internals, framework architecture, or understanding frontend beyond the API level, I'd love to hear your thoughts!


r/reactjs • • 2d ago

Show /r/reactjs Introducing TanStack Redact

Thumbnail
tanstack.com
166 Upvotes

r/reactjs • • 1d ago

Resource chanx-js: typed WebSocket hooks for React, generated from your chanx server's AsyncAPI

2 Upvotes

Hi all, I want to share a WebSocket library I built, chanx-js. It makes the messages on both ends of a socket typed, keeps the frontend in sync with what the server really sends, and comes with React hooks.

Every realtime feature I built in React ended up the same way. lastMessage was any, so I wrote the message types by hand and found out the backend had changed them only when something broke in production. On top of that I kept rewriting the same reconnect logic and the same switch over message types in every project.

How it works, in three steps: `

  1. The server declares its messages and handlers. Here with chanx-js on Node:

​

const Chat = defineMessage('chat', z.object({ text: z.string() }));
const Notice = defineMessage('notice', z.object({ text: z.string() }));

const chat = consumer('/ws/chat/{room}', {
  name: 'chat',
  groups: (conn) => [`room.${conn.params.room}`],
}).on(Chat, { output: Notice }, (m, ctx) =>
  ctx.broadcast(Notice.create({ text: m.payload.text })),
);
  1. The server publishes those as AsyncAPI, and the CLI turns them into a typed channel:

    npx @chanx-js/codegen http://localhost:8000/asyncapi.json # writes src/generated

    // src/generated/channels.ts export type ChatToServer = ChatMessage; // { action: 'chat'; payload: { text: string } } export type ChatToClient = NoticeMessage; // { action: 'notice'; payload: { text: string } } export type ChatReplies = { chat: NoticeMessage };

    export const chat = defineChannel<ChatToServer, ChatToClient, ChatReplies>()({ name: 'chat', address: '/ws/chat/{room}', });

  2. Your component uses that channel with useChannel:

    import { createClient } from '@chanx-js/client'; import { ChanxClientProvider, useChannel } from '@chanx-js/client/react'; import { chat } from './generated';

    const client = createClient({ baseUrl: 'ws://localhost:8000' });

    function ChatRoom({ room }: { room: string }) { const { status, messages, send } = useChannel(chat, { params: { room }, buffer: 'all', });

    return ( <> <p>{status}</p> {messages.map((m, i) => ( <p key={i}>{m.payload.text}</p> ))} <button onClick={() => send({ action: 'chat', payload: { text: 'hi' } })}> Send </button> </> ); }

    root.render( <ChanxClientProvider value={client}> <ChatRoom room="lobby" /> </ChanxClientProvider>, );

params must have room because the path does, m.payload.text is a string, and send({ action: 'chat', payload: { txt: 'hi' } }) fails to compile. When the backend changes a message, you regenerate and TypeScript shows every place to fix.

What else it gives you:

  • const reply = await request({ action: 'chat', payload: { text: 'hi' } }), with the reply typed from ChatReplies
  • Reconnects, and topic subscriptions (room:lobby, ...) restored after a reconnect
  • lastMessage for the latest message, or an on map with callbacks that don't re-render, and batch: 'raf' for busy streams
  • The server side too: one validated handler per message type, AsyncAPI docs generated from the code, broadcasts across instances through Redis

The backend needs to be a chanx server, since the client relies on its message format and the AsyncAPI it publishes. That can be chanx-js on Node (ws, Express, Fastify, Hono, NestJS), Bun or Deno, or chanx on Django and FastAPI, the Python version I started with.

It's still new on the JS side, so if you run into any problem or have ideas to improve it, please open an issue or a discussion. Stars and PRs are welcome too.


r/reactjs • • 1d ago

Show /r/reactjs I use AI every day, so I built a place to practise debugging React without it

0 Upvotes

I use AI when coding, but I don’t want to lose the ability to work through a problem without it. It’s easy to get working code now. Understanding what it does, why it breaks, and whether a suggested fix is actually right still takes practice.

That’s why I built Debug React: https://debugreact.com

You get a small broken React app and a bug report. Investigate it, fix it in the live editor, run behavioural checks, and explain your reasoning. Then review someone else’s proposed fix for the same bug. Some look right but miss something important.

The idea is to do the exercises without AI. Documentation, debugging tools, and built-in hints are welcome. I wanted a place to keep practising the understanding that comes from figuring things out yourself.

Four scenarios so far, covering async requests, list state, failed saves, and effects and event listeners. Each takes about 20 minutes. Free, no account, no scores. Progress stays in your browser. Best on a computer.

If you try one, I’d love to hear what was confusing, whether the checks felt fair, and which React bug you’d want next. Honest feedback welcome, including the critical kind. Thanks for taking a look!


r/reactjs • • 1d ago

Show /r/reactjs Open-sourced Varelyo UI - a React component library

0 Upvotes

While developing a tool for designing products directly in code, I kept running into the same issue: AI agents recreating basic UI components for every project, often with inconsistent styles and token structures.

So I created Varelyo UI, a React/TypeScript component library with typed APIs, predefined states, variants and a three-layer token architecture:

Core - base design values

Semantic - tokens that define how those values are used

Component - component-specific styling

You get the actual component source code to use and modify in your own projects. You can change the brand through tokens, customize components and extend the system as your product grows.

I originally made this for my own workflow, but decided to open-source it under MIT. It works independently of my desktop tool or any AI agent.

GitHub: https://github.com/varelyo/ui

Would appreciate feedback on the component APIs and token architecture.


r/reactjs • • 1d ago

Show /r/reactjs Built a real-time 3D Cyber Command Center with React and CesiumJS — handling state syncing across dynamic WebGL layers

0 Upvotes

Hey everyone,

I built an interactive 3D tactical command center using React and CesiumJS to track real-time global telemetry feeds.

Key React implementation details:

• Canvas & WebGL Integration: Synced Cesium's render loop with React state without triggering unnecessary re-renders during high-frequency telemetry updates.

• Custom Hooks: Encapsulated live ADS-B flight feeds, orbital satellite calculations (SGP4), and threat feeds into dedicated streaming hooks.

• Performance: Avoided standard React DOM nodes for map markers; batched updates directly into Cesium primitive collections to maintain a smooth 60 FPS.

• Dynamic Telemetry: Global fiber optic lines, data centers, and live GNSS interference zones rendered dynamically.

Looking for feedback on React state management patterns when handling high-frequency WebGL data streams!

(Live demo link added in the comments below)


r/reactjs • • 2d ago

News Wasp web framework v1.0 is coming: the roadmap and what changes

Thumbnail
wasp.sh
3 Upvotes

r/reactjs • • 2d ago

Show /r/reactjs Build a functioning component to edit and save real Excel files

0 Upvotes

I was building a web app and wanted Excel files to live within it and be fully modifiable / saveable, but couldn't find anything open source that fully fit the bill. I ended up building the repo below.

Basically full Excel functionality in our React app including:

  • Import .xlsx and csv file, export to .xlsx
  • Fully preserves existing Excel formatting
  • Real-time calc that's a heavily modified fork of ironcacl
  • Formulas and calculations
  • Multiple worksheets
  • All the formatting options you'd use on day-to-day basis
  • Fully open source

https://github.com/pixelsmasher13/gridpath. Please let me know if you end up trying it out.


r/reactjs • • 2d ago

Arrivo: loading states for React that play where your content will land, then hand the real elements back

0 Upvotes

Skeleton screens always felt like a guess to me: grey bars in roughly the right shape, then the real content pops in somewhere slightly different.

So I built Arrivo. While loading is true, an effect plays exactly where your content will land. When it turns false, the real elements are revealed in place.

Demo : https://tuancuongpham.github.io/arrivo/ 

Code: https://github.com/tuancuongpham/arrivo

npm i u/brottin/arrivo

import { Reveal } from '@brottin/arrivo';

import { halftone } from '@brottin/arrivo/effects';

<Reveal effect={halftone} loading={isLoading}>

  <ArticleCard post={post} />

</Reveal>

How it works:

  • Your content stays in the DOM, hidden with visibility, so nothing shifts when it lands.
  • Each wrapper gets one canvas overlay. Text lines are measured with Range rects and images are read from the page, so the effect draws the real shape of your content instead of a guess.
  • An effect is two draw functions, idle() and reveal(p). One shared requestAnimationFrame loop drives every instance, off-screen ones pause, and reduced motion turns every reveal into a 150 ms fade.
  • Zero runtime dependencies, about 8.5 KB gzipped for the core and 0.7 to 3.4 KB per effect, tree-shaken.

The 13 effects: split-flap, redacted, quadtree mosaic, CMYK halftone, CRT tune-in, ink (with 8 threshold maps), particle swarm, darkroom, Tetris, fuse (with a Lunar New Year mode), equalizer, thermal and snowfall.

It's 0.1.0, so feedback is very welcome, especially on where you'd actually use something like this and where it would be too much.


r/reactjs • • 2d ago

News I'm building Pimolu UI, a React component library, would love your feedback!

0 Upvotes

Hey everyone! 👋

I've been working on Pimolu UI, an open-source React component library focused on clean design, customization, and smooth interactions.

I wanted to share my first motion showcase, featuring some of the components, their interactions, and examples of interfaces you can build with them.

My goal is to make building modern, consistent UIs easier while keeping components flexible and developer-friendly.

This is still a work in progress, and I'd genuinely love to hear your thoughts!

  • What do you think of the design and animations?
  • Is there anything you'd improve?
  • What would make you consider using a new UI library?

🌐 Website: https://pimolu.com

Any feedback is appreciated! 🚀


r/reactjs • • 2d ago

Show /r/reactjs 3 new components. 4 distinct styles. One more reason to make the web less boring. ✨

0 Upvotes

Just added 3 new components to Ovio, bringing the collection to 20 animated React components. Each available in 4 styles: Minimal, Craft, Retro, and Toy.

Built on the shadcn registry model, Ovio is for developers who want their websites to feel a little less ordinary, with motion and interactions that go beyond the usual UI.

The motion layer for developer websites.

Explore Ovio → https://ovioui.vercel.app


r/reactjs • • 3d ago

Resource I built a Redux Toolkit inspired state management library from scratch

0 Upvotes

I recently created a complete tutorial where I build a Redux Toolkit-inspired state management library from scratch using React and JavaScript.

The goal is to understand how Redux-style state management works internally instead of only using the package.

In the tutorial, I implement:

  • A custom createStore function
  • Store Provider
  • Reducers and actions
  • Subscribers and listeners
  • useSyncExternalStore
  • useSelector and custom store hooks
  • Redux DevTools integration
  • createSlice
  • combineReducers
  • shallowEqual
  • Thunk functionality
  • Final testing and debugging

YouTube tutorial:
https://www.youtube.com/watch?v=LucUJ-5COjg

I would appreciate feedback from the community, especially on the library design, API structure, and any improvements that could make this project more reliable or easier to use.

Please note: this is an educational project designed to understand Redux and state management concepts internally. It is not intended to replace the official Redux Toolkit.


r/reactjs • • 4d ago

Needs Help I really need some pointers

7 Upvotes

I read a few books on JavaScript and coding in general

This was in late 2025 and a few months later I started writing react js,
Ai has gotten so good at writing code, it is way better than I am.

I have pretty okay fundamentals of coding that I have been able to spin up some interesting projects with Ai.

But if you ask me what some parts of the code does, I have very little idea about it.

How can I catch up with so many years old coding experience and survive in this field if Ai learns 20x faster.


r/reactjs • • 4d ago

Needs Help Please help me understand Zod schema transformations

Thumbnail
6 Upvotes

r/reactjs • • 4d ago

I've been working on a canvas-powered timeline library for React, Vue and TypeScript

Thumbnail
6 Upvotes

r/reactjs • • 4d ago

I made a small headless library for handling form submissions in React / Next.js

0 Upvotes

Hey everyone,

I kept writing the same code for every form in my projects: react-hook-form setup, a try/catch around the server action, mapping server errors back onto the fields, a loading state, stopping double submits, a toast, refreshing the data, resetting the form... and doing it again for every add/edit/delete dialog.

So I pulled all of that into a small package called **submitly**.

It’s headless, so it doesn’t render anything. You keep your own components (shadcn, Radix, Base UI, plain inputs, whatever you use).

What it does:

* `useCrudForm`: react-hook-form + schema validation + your action in one hook

* Works with any Standard Schema library: Zod 3/4, Valibot, ArkType

* Server errors get mapped to the right fields automatically (nested ones like [`items.0.name`](http://items.0.name) too)

* Ignores double submits while a request is in flight

* Locks the dialog while saving, so the user can’t close it halfway through a request

* `useCrudAction` for delete/toggle buttons, with the same behavior

* One provider where you plug in your own toast, router and refresh logic

* Next.js helpers: `runAction` for server actions (validates again on the server, revalidates on success, turns thrown errors into a clean result), and it handles `redirect()` from server actions properly

* Also works in plain React + Vite (there’s an example with React Router + TanStack Query)

* Around 3 kB gzipped, typed end to end, tested on React 18 and 19

Quick example:

const { form, onSubmit, isSubmitting } = useCrudForm({

schema,

defaultValues: { name: "" },

action: createProduct,

onSuccess: () => closeDialog(),

});

It’s still early (0.x), so I’d really like feedback: what’s missing, what’s confusing, or what you’d do differently.

Docs: https://submitly-docs.vercel.app

GitHub: https://github.com/toony10/submitly

If you find it useful, a star on GitHub would mean a lot. Thanks for reading 🙏


r/reactjs • • 3d ago

Needs Help Web Application Hosting (React)

0 Upvotes

Hello. Does anyone know how to host a web application built with React—both the frontend and the backend?


r/reactjs • • 4d ago

I made a small headless library for handling form submissions in React / Next.js

0 Upvotes

Hey everyone,

I kept writing the same code for every form in my projects: react-hook-form setup, a try/catch around the server action, mapping server errors back onto the fields, a loading state, stopping double submits, a toast, refreshing the data, resetting the form... and doing it again for every add/edit/delete dialog.

So I pulled all of that into a small package called submitly.

It’s headless, so it doesn’t render anything. You keep your own components (shadcn, Radix, Base UI, plain inputs, whatever you use).

What it does:

  • useCrudForm: react-hook-form + schema validation + your action in one hook
  • Works with any Standard Schema library: Zod 3/4, Valibot, ArkType
  • Server errors get mapped to the right fields automatically (nested ones like items.0.name too)
  • Ignores double submits while a request is in flight
  • Locks the dialog while saving, so the user can’t close it halfway through a request
  • useCrudAction for delete/toggle buttons, with the same behavior
  • One provider where you plug in your own toast, router and refresh logic
  • Next.js helpers: runAction for server actions (validates again on the server, revalidates on success, turns thrown errors into a clean result), and it handles redirect() from server actions properly
  • Also works in plain React + Vite (there’s an example with React Router + TanStack Query)
  • Around 3 kB gzipped, typed end to end, tested on React 18 and 19

Quick example:

const { form, onSubmit, isSubmitting } = useCrudForm({
  schema,
  defaultValues: { name: "" },
  action: createProduct,
  onSuccess: () => closeDialog(),
});

It’s still early (0.x), so I’d really like feedback: what’s missing, what’s confusing, or what you’d do differently.

Docs: https://submitly-docs.vercel.app/
GitHub: https://github.com/toony10/submitly

If you find it useful, a star on GitHub would mean a lot. Thanks for reading 🙏


r/reactjs • • 5d ago

News This Week In React #302: Next.js, React Router, DevTools, Security, shadcn, Hydrogen, Vinext, Mutative, R3F | RN 0.88, Expo 58, Navigation, FastImage, Screens, Device Hub, Edge to Edge | TypeScript, PHP, CrUX, Rsdoctor, Astro

Thumbnail
thisweekinreact.com
17 Upvotes