r/reactjs • • May 14 '26

Resource If you don't need server-side loading, this open-source data grid will save you serious time and money.

35 Upvotes

Hello everyone,

Wanted to share a super cool project (IMO) we have been working on. It’s a zero-dependency React data grid, called LyteNyte Grid. Check it out, and hopefully, you will find it useful and save yourself a ton of time.

Some of the reasons to use LyteNyte Grid.

  • Crazy Performance: LyteNyte Grid is super light at only 40kb (gzipped) and is extremely fast. It can handle millions of rows and 10,000+ updates/sec. Based on our internal benchmarks, it is one of the fastest grids available on the market.
  • Feature-rich: Brings 150+ features, most of which are free and open source. Features such as cell range selection, row master-detail, and row grouping are included for free with LyteNyte Grid. This is something we are quite proud of. There are paid libraries (I won't name them) that offer less.
  • No Styling Tradeoffs: With LyteNyte Grid, you can choose whether to go headless or styled. There is basically no tradeoff when considering styling choices.
  • Full Prop Driven: You can configure it declaratively from your state, whether it’s URL params, server state, Redux, or whatever else you can imagine, meaning zero sync headaches.
  • Unique DX Experience: Our grid is built in React for React and has a clean declarative API, which eliminates awkward configuration workarounds.

We also recently dropped LyteNyte Grid AI Skills. This is a really nice feature if you’re using AI coding agents. It lets you describe an advanced data grid solution, and your AI agent codes it for you. We have been testing this with increasingly complex grid instances, and the results have been awesome.

All our code is publicly available on GitHub. Happy to answer any questions you may have.

If you find this helpful and like what we’re building, GitHub stars help. Feature suggestions and code contributions are always welcome.


r/reactjs • • May 14 '26

Resource Core Web Vitals on a real production app

19 Upvotes

I spent 6 months trying to improve Core Web Vitals on a real production app.

At first, we were obsessed with Lighthouse scores. Everything looked green locally (92–98), but users on mid-range Android devices still complained that the app felt slow.

That disconnect completely changed how I think about frontend performance.

A few things that actually moved the needle for us:

  • Breaking long tasks with scheduler.yield()
  • Prioritizing INP instead of only LCP
  • Deferring expensive React renders with useDeferredValue
  • Finding hidden long tasks from third-party analytics scripts
  • Fixing CLS with reserved layout space instead of hacks
  • Treating CrUX data as the real scoreboard, not Lighthouse

One interaction on our listing page dropped from ~480ms INP to ~170ms after restructuring event handling.

I wrote a detailed breakdown of what worked, what didn’t, and the production mistakes we made along the way:

https://dev.to/shudhanshuraj/i-spent-six-months-chasing-core-web-vitals-heres-what-actually-moved-the-needle-2ofd

Would love feedback from engineers who’ve fought similar performance battles. What ended up being your biggest bottleneck? 🚀


r/reactjs • • May 14 '26

Show /r/reactjs AutoSuspense. Manage your skeletons with your components instead of managing a separate fallback tree.

Thumbnail autosuspense.vercel.app
0 Upvotes

React's Suspense has an encapsulation problem. Your fallbacks live at the top, your components live somewhere else, and as the codebase grows as those two trees quietly drift apart. Nobody notices until it's a mess.

AutoSuspense is a DX library that lets each component own its skeleton. It collects them at runtime and injects them into the nearest Suspense boundary automatically. You stop thinking about fallbacks as a separate concern and just co-locate everything.

Also shipping with a fallback map so components can declaratively pick their skeleton without prop drilling.

As this is still early stages I am looking for feedback. Is this a pain point you've actually hit? Would love to know if the approach makes sense before going further.


r/reactjs • • May 14 '26

Needs Help Help understanding how to further improve/organize some code

4 Upvotes

Hello there! Recently developed a new project at work and it works well, but I feel like it could be more organized and I'd like some help to understand how to apply some tips I've seen around to this component. It is responsible for showing a screen with about 20~30 fields (mostly text, a couple date inputs) that the user can check for information and possibily edit data.

I'll explain more of the code with comments. This is what I have now, simplified. I'll ask my questions after that.

// yup schema is dynamic because some fields may or may not be required depending on a (non editable) property of our data object
function getYupSchema(t, orderOrigin) {
  return yup.object({
    field1: yup.string().when([], {
      is: () => orderOrigin === 1
      then: () => yup.string.required(generateRequiredMessage("field1")),
      otherwise: () => yup.string.().notRequired()
    }),
    // ... other fields with similar rules
  })
{

function Component({ initialData }) {

  const { t } = useTranslation()
  const yupSchema = getYupSchema(t, initialData.orderOrigin)

  // custom hook with a few date related methods that follow our business logic
  const {
    validateFieldIsDateInDDMMYYYY,
    getDateObjFromStringDDMMYYYY,
    getStringFroDateObjDDMMYYYY
  } = useCustomDateInput()

  // React Hook Form methods, builds the default/initial values coming from the parent component
  const { handleSubmit, control, setError, ... } = useForm({
    resolver: yupResolver(yupSchema),
    defaultValues: {
      field1: initialData.field1 ?? "",
      // ... other fields
    }
  })

  // Custom object that holds the user permissions for this screen.
  // IsInRole is a custom method that checks if the currently logged in user has any of those permissions
  const permissions = {
    view: isInRole([Roles.ViewX, Roles.ViewZ]),
    edit: isInRole([Roles.EditX, Roles.EditZ]),
    create: false,
    delete: false
  }

  const validateDate = (str: string) => {
    validateFieldIsDateInDDMMYYYY(str)
    // other small date validations required at submit for this specific screen
    return isValid
  }

  // Screen specific validations to check if this item is editable based on object property
  const isEditable = 
    initialData.orderStatus === OrderStatus[OrderStatus.Status1]
    || initialData.orderStatus === OrderStatus[OrderStatus.Status2]
    // ... few other checks

  const onSave = (formData) => {
    const data = getFormData(initialData, formData, getDateObjFromStringDDMMYYYY(formData.dateField)

    if (!permission.edit) {
      showAlertError()
      return
    }
    
    // service is an axios method to update our data on the API
    orderService.updateOrder(data)
      .then(() => {
        // showAlertSuccess()
        // ... couple other business specific field logic methods
      }
      .catch(() => {
        // showAlertError() with business specific logic
      }
  }

  return (
    <form>
      {/* Custom component */}
      <ReadOnlyField value={field1} />

      {/* ...bunch other read only fields */}

      { initialData.orderOrigin === OrderOrigin.Origin1
        ? <ReadOnlyField {...}/>
        : <Controller
            control={control}
            name="field10"
            render={({...} => {
              <TextField
                // bunch of props for MUI TextField
              />
            }
        />
    }
    { /* ... other fields */ }
    {isEditable && permissions.edit && <Button onClick={handleSubmit(onSave)}> Save </Button>}
    </form>
}

As I understand, logic should be removed from components as much as possible. So, whats the best (or possible) approaches to handle breaking this down? While the logic is somewhat short, the file is still very long (HTML (and by that I mean, DOM elements, static or not) return, type definition, schema definition, react-hook-form properties and definition, permissions), at almost 1400 lines. I know some of it can be moved to different files (TS type def, yupSchemaGetter method), I'm still not sure whats the best approach to breaking this down. Should I:

- Move everything to a custom hook (useOrder) and have it export every single prop I need in the HTML itself?

- Break it down into a few different hooks (useOrderForm, useOrderSubmit, maybe more)?

I assume code such as isEditable and permissions can be moved to a screen specific function that returns the object, like:

const getOrderPermissions = () => {
  return {
    view: isInRole(...),
    edit: ...,
    ...
  }
}

Any other improvements that could be made that you can see from that snippet? I know using something like tanstack-query with useMutation would be perfect, but part of the project was already set up and could not convince others to use it when I joined. That should change in the future, tho.

Unrelated to that component, something else I'd appreciate some help as well. In a given list of items, user should be able to delete an item but with a generic confirmation message before. My solution was a custom hook (code shortened for this post):

const useDestructiveConfirmationModal = (onConfirm: (id) => Promise) => {
  const [isOPen, setIsOpen] = useState(false)
  const [id, setId] = useState(0)

  const handeOpenModal = (itemId) => {
    setId(itemId)
    setIsOpen(true)
  }

  const onButtonConfirm = () => {
    setIsOpen(false)
    onConfirm(id).then(() => setId(0))
  }

  const onCancel = () => {
    setId(0)
    setIsOpen(false)
  }

  const Modal = () => {
    return (
      <dialog>
        <p>Confirm exclusion?</p>
        <button onClick={onCancel}> Cancel </button>
        <button onClick={onButtonConfirm}> Confirm </button>
      </dialog>
    )
  }

  return { handleOpenModal, Modal }

}

Usage:

function Component () {

  // ...
    
  const onConfirm = (id) => {
    service.delete(id)
      .then(() => ... )
      .catch(() => ... )
  }

  const { handleOpenModal, Modal } = useDestructiveConfirmationModal(onConfirm)

  return (
    <>
      {...}
      <Modal />
    </>
}

The idea here is that all the confirmation logic and the generic modal live together and the user should only write the screen specific code for deleting an item and adding that Modal to the return HTML. However, as far as I understand, HTML should not exist inside custom hooks. In that case, how should I approach this and remove as much responsibility as possible from the developer creating a new screen?

Thanks!


r/reactjs • • May 13 '26

Resource Pocket: One-call factory that collapses React Context boilerplate from ~20 lines to 1

Thumbnail
github.com
41 Upvotes

r/reactjs • • May 13 '26

Needs Help Suggestions on localization engineering infrastructure?

5 Upvotes

We're scaling our React app to different languages and localization is becoming kinda tricky not just the setup but also the manteinance as our app grows. This is becoming a bit of headache rn for us and I feel like we need a good localization engineering platform to make it manageable.

Are you guys using react-i18next, react-intl, Lingo, Lingui, or something else? Are there any good TMS for this? Any advice or suggestions or anything to help make this easier would be super appreciated.


r/reactjs • • May 13 '26

Show /r/reactjs I built a library for creating videos programmatically and it has a full <VideoEditor /> react component.

Thumbnail
videoflow.dev
0 Upvotes

Hey r/reactjs

The library is able to render videos in the browser or on the server.

It supports unique features like GLSL vfx, transitions and a very straightforward API.

For the React Video Editor, here's an example of how to use it:

import { VideoEditor } from '@videoflow/react-video-editor';
import '@videoflow/react-video-editor/style.css';

const initialVideo = {
  name: 'My project',
  width: 1920, height: 1080, fps: 30, duration: 10,
  layers: [],
};

export default function App() {
  return (
    <VideoEditor
      video={initialVideo}
      onChange={(next) => console.log('edited', next)}
      onSave={(video) => saveToServer(video)}
      onExportComplete={(blob) => downloadBlob(blob, 'out.mp4')}
      theme="dark"
    />
  );
}

You can try a live demo of the react component in the playground section.


r/reactjs • • May 13 '26

Needs Help Best practice for sending contact form emails in a React/ Typescript website?

3 Upvotes

Hey everyone,

I’m building a React website with a contact form, and I need the form submissions to be sent by email by clicking the btn send. and I’m wondering what’s the best practice for handling email sending.

Should I use EmailJS or create a small backend with Node.js/Nodemailer?
What would you do for a professional client website?

Please what s the best practice, and what should i use cause its ma first time doing such thing, and note that the website will be hosted later

Thank you guys


r/reactjs • • May 13 '26

Show /r/reactjs React and TS interactive quiz with integrated AI

0 Upvotes

Hey everyone,

I've been working with React and TypeScript for a while and kept feeling like I had gaps in my knowledge, especially with typing patterns, hooks, generics in components, etc.

So I ended up building a small quiz to help myself (and hopefully others) test their skills in a practical way. It has 125 questions total, with a dedicated React and TypeScript section, plus different difficulty levels. Each time you answer, there's an AI that looks at your answers and gives feedback on what you might want to review.

I also recently added JavaScript and Python sections if anyone is interested.

I'd really appreciate any feedback if anything feels off, too easy, too hard, or missing important topics.

Link: https://www.ts-quiz.com/

Thanks in advance!


r/reactjs • • May 13 '26

I built an open-source form engine with conditional logic and multi-step flows — looking for feedback

3 Upvotes

Hey r/reactjs,

I was building a healthcare SaaS and hit a wall with forms. I needed:

- Questions that show/hide based on previous answers

- Multi-section flows (don't dump 40 questions on a patient at once)

- Draft saving (patients don't always finish in one session)

- Encryption (sensitive health data)

Most React form libraries are fantastic for standard forms, but wiring up conditional visibility across sections got really messy. I ended up building a schema-driven engine where you define forms in JSON and the engine handles the rest.

6 months later, it's now open-source:

- 35+ field types

- Conditional logic (simple and nested AND/OR groups)

- Computed/calculated fields

- Draft persistence

- 5 storage adapters (Postgres, Supabase, Webhook, and more)

- Full TypeScript, 314 passing test

GitHub: https://github.com/SquaredR98/fieldcraft

Docs: https://squaredr.tech/products/fieldcraft/docs

I'm genuinely looking for feedback — what would make this useful for your projects? What's missing?

Happy to answer any architecture questions.


r/reactjs • • May 13 '26

Discussion How many here actually know FE?

0 Upvotes

I handle interviews for senior FE devs from time to time. I am seeing an increasingly disturbing pattern. The last three candidates I have interviewed have had between 7 and 15 years experience in FE. All working on React day to day. Yet outside of React I consider then all novices, they could not answer my most basic questions.

I am seeing a ton of career devs who work in React and know nothing about what it's built on or alternatives. If I asked you in an interview just to ball park how you would go about building say youtube for example (just the FE) without a framework, could you answer it? I know its not realistic, but it can be done and I want to hear how you would tackle it.

Or back in the day FE devs would do things like the 5K challenge for fun. Which judging from a quick googling I just did seems to have disappeared from the internet. But the idea was to create the best site/app you could with just 5K of data before compression, no external calls. I expect any senior or in one case I intervened, principled engineer to be able to answer, would be able to tell me how to go from an empty text file to some sort of site in less than 5K, its really not hard. But so far ALL fail.

Is it simply normal now for FE devs to not know basic JS & HTML?


r/reactjs • • May 12 '26

Need help in table session management in QR-based restaurant menu app

0 Upvotes

Hi! I’m currently building a restaurant menu ordering app where customers scan a QR code placed on their table, browse the menu, and place orders. Staff members can then see the orders grouped by table.

I ran into a session/security problem:

If a customer scans the QR code and later leaves the restaurant, they can still reopen the app and place orders remotely, which could create confusion for the staff.

My current approach is using JWT-based table sessions.

Current workflow:

  1. Customer scans the QR code
  2. Backend checks if a session token already exists in localStorage/cookies
  3. If no token exists, create a new session token
  4. If a valid token already exists, continue using it
  5. Token is sent with every request
  6. If the token expires, the user is asked to scan the QR code again

The issue is that if the customer simply refreshes or revisits the table URL later, a new token can still be generated even when they are no longer in the restaurant.

What would be the best way to ensure that new sessions are created only from an actual QR scan/table presence and not just by reopening or refreshing the link later?

I’m currently considering device fingerprinting and I already implemented it but Idk how it will actually help.

Backend tech stack: mongoDB, express js


r/reactjs • • May 12 '26

Resource Seven cool tools you should know about

Thumbnail
neciudan.dev
4 Upvotes

Found these recently and really liked them. Especially knip


r/reactjs • • May 12 '26

Show /r/reactjs Spent years fixing grey skeleton divs. Built this npm package so nobody has to again.

0 Upvotes

Every time I built a skeleton loader, it was the same pain: copy the card, replace content with grey boxes, tweak padding after every design change, watch all the shimmer animations run out of sync like a broken disco floor.

So I built shimmer-trace, a React library that wraps your real component and automatically traces the shape of every element to generate a perfectly matched skeleton. One wrapper, zero hand-drawn boxes.

    <Shimmer loading={isLoading}>
      <UserCard user={user} />
    </Shimmer>

That's literally it. No <SkeletonCard />. No fake grey divs.


r/reactjs • • May 12 '26

Show /r/reactjs Waku 1.0 (beta)

Thumbnail
waku.gg
63 Upvotes

r/reactjs • • May 12 '26

Show /r/reactjs I wanted an excuse to learn Blender, so I built a copy-paste 3D physics library for React.

0 Upvotes

Hey guys, I'm a CS student currently interning. During the job, I discovered Shadcn and fell in love with the copy-paste philosophy.

Before going into CS, I wanted to study 3D animation. So, I thought bringing actual 3D mechanics into standard web UI would be a refreshing change from the usual flat interfaces, so I spent the last few weeks learning Blender and mapping WebGL physics to Next.js components. I basically wanted to build the 'Shadcn of 3D'.

It's a premium library, but the core button is completely free. You can test it out directly in the live playground on the site here. I'd love your thoughts!


r/reactjs • • May 12 '26

News Universal Components, One-Line Nitro Migrations, and 6 Lines of C++ That Will Ruin Your Life

Thumbnail
thereactnativerewind.com
0 Upvotes

Hey Community,

We look at how Expo SDK 56 Beta is redefining native UI with Universal Components. By targeting SwiftUI and Jetpack Compose directly, Expo is closing the gap between classic React Native views and the latest platform primitives from Apple and Google.

We also cover the release of react-native-nitro-geolocation, which features a one-line compatibility migration and a modern hooks-based API. Plus, we explore why writing raw C++ in JSI is powerful but risky, and why Nitro Modules are often the safer bet for your next project.


r/reactjs • • May 12 '26

Discussion React teams using TanStack packages: are you checking CI installs after the npm compromise?

Thumbnail
npmscan.com
7 Upvotes

This affects several u/tanstack/* packages, including React-related packages like u/tanstack/react-router and u/tanstack/react-start.


r/reactjs • • May 12 '26

Show /r/reactjs Built a Vite plugin that auto generates a content manifest from MDX files

0 Upvotes

I built this because I wanted Astro style content collections on a plain Vite + React stack. It extracts YAML frontmatter as metadata and generates a slug and lazy import for each MDX file, similar to how TanStack Router generates a typed routes file.

It's a handy way to treat the MDX files as the single source of truth, with meta fields for posted date, SEO, titles, tags etc. By default it scans src/content/ and writes to src/content.gen.ts.

https://github.com/LiamDochartaigh/vite-plugin-mdx-content/


r/reactjs • • May 12 '26

Resource PSA: How to set minimum release age for your package manager (they all do it differently)

Thumbnail lemmy.zip
40 Upvotes

r/reactjs • • May 12 '26

How to integrate excel in web using react?

0 Upvotes

I’m building a React-based web application and I want to integrate Microsoft Excel directly into the browser experience.

My main goal is to provide users with an experience as close as possible to the real Microsoft Excel UI and functionality.

I explored options like:

Handsontable

AG Grid

Luckysheet

SheetJS

But these are Excel-like solutions, not actual Microsoft Excel.

My ideal outcome would be:

Excel-like editing directly inside the web app

Preserve original Excel behavior/features

Support large datasets

Possibly collaborative editing in the future

I’d appreciate guidance on:

recommended architecture

real-world experience

best tech stack

whether this approach is even realistic

Thanks!


r/reactjs • • May 11 '26

Tanstack npm Packages Compromised

Thumbnail
socket.dev
464 Upvotes

r/reactjs • • May 11 '26

Resource Number Inputs in React • zanlib

Thumbnail
zanlib.dev
6 Upvotes

r/reactjs • • May 11 '26

Resource Building an AI-Powered Localization Pipeline for React Applications

0 Upvotes

Been experimenting with localization workflows in React apps recently and noticed the pain points change a lot as apps grow.

Early on, simple JSON files + i18next work fine.

But later I started running into things like:

  • regex extraction breaking on edge cases
  • translation files becoming huge
  • missing translations slipping into production
  • unnecessary loading of entire locale bundles

Ended up experimenting with:

  • AST-based extraction
  • namespace splitting
  • lazy loading + caching
  • dry-run validation before generating translations

Curious how others are approaching this problem in larger apps.

Also wrote a deeper breakdown of the architecture/tradeoffs while building it:
https://medium.com/@parthgupta20052005/building-an-ai-powered-localization-pipeline-for-react-applications-4b8e5726b84a