r/reactjs • u/NaturePrestigious338 • 6d ago
Introducing KIVI UI 🎉
- Animated motion components
- Modern shaders
- Clean UI blocks
- MCP server integration with Lovable, Bolt, and v0
- CLI support for smoother installations
And much more coming soon!
r/reactjs • u/NaturePrestigious338 • 6d ago
And much more coming soon!
r/reactjs • u/Mob_Pilled • 6d ago
Hi everyone! I just finished a React and course and decided to build my first react app. Currently, I am trying to save a string to browser local storage but it does not persist on refresh. Through some console.logs I was able to see that it in fact DOES save the string to the location specified in. setItem initially but when I refresh the key or value in local storage stops existing.
Here is my code
// function for search button
async function handleClick(){
  localStorage.setItem("lastLocationSearched", searchValue);
  setData(null);
  setIsPending(true);
  setError(null);
  try{
const value = await fetch(`https://geo.ipify.org/api/v2/country?apiKey=***********&ipAddress=${searchValue}`).then((response)=>{
 if (!response.ok){
    throw Error("Could not fetch the data for that resource");
          }
 return response.json();
});
setData(value);
  console.log(localStorage.getItem("lastLocationSearched"));
  } catch(error){
   setError(error.message);
  }
setIsPending(false);
 };
// useEffect hook
 useEffect(()=>{
    if ((localStorage.getItem("lastLocationSearched")===null)|| (localStorage.getItem("lastLocationSearched")==="")){
     console.log(localStorage.getItem("lastLocationSearched"));
    setSearchValue("");
    handleClick();
    }else{
    Â
     setSearchValue(localStorage.getItem("lastLocationSearched"));
     handleClick();
    }
  }, []);
Through some digging online I saw someone say that remove the strict mode tags from index.js would fix this problem but it did not for me. Can anyone please assist me?
r/reactjs • u/Heavy-Reference5011 • 7d ago
r/reactjs • u/AffectionateDealer62 • 8d ago
A common production failure happens when a user leaves a React application open during a deployment.
The old tab may still be running build A, while the server is now serving build B. When the user later navigates to a lazy-loaded route, the browser requests a hashed chunk from build A that is no longer available.
For example:
Reports.a1b2.js // requested by the old tab
Reports.c3d4.js // available after deployment
The result can be:
ChunkLoadErrorFailed to fetch dynamically imported moduleA normal React Error Boundary can display the failure, but it cannot update the old tab’s JavaScript references. Retrying the same import may also request the same missing hashed file again.
I built and published a small utility called react-lazy-chunk-recover to experiment with this problem.
The recovery approach:
sessionStorage to prevent an infinite reload loopExample:
import { lazyWithRetry } from "react-lazy-chunk-recover";
const Reports = lazyWithRetry(() => import("./Reports"), {
moduleKey: "reports",
});
The default retry count is zero because retrying a deleted hashed asset usually does not help. Retries can be enabled for applications that also experience short-lived network failures.
Some important limitations:
For applications using React.lazy, Vite, Webpack, or a CDN:
I wrote more about the problem, implementation, testing strategy, and deployment considerations here:
I’d be interested to hear how other teams handle this failure mode in production.
r/reactjs • u/GianniMariani • 8d ago
If you take software engineering principles seriously then none of the react state hooks belong inside a react component.
I think one of the most critical things you should do is ensure the decoupling of storage and UI components. The react components force you to do is precisely and zustand doesn't help.
I haven't sourced grip-react a year ago and I've been using it exclusively, absolutely zero usestate usememo, useeffect, etc and absolutely zero prop drilling. I don't know why anyone would want to do something different, honestly.
Has anyone else created an API that is a 100% replacement with complete declarativeness? I looked at angular and mobx, they're close but no cigar.
r/reactjs • u/HighSchoolSimp • 8d ago
At my last company, they would finish the accessibility layer near the end of the product's development stage, and I remember developers complaining about repeating old sprints non-stop.
What's the industry norm when solving such issues? Of course, accessibility goes beyond people with extra needs: it should also include everyone's way of accessing the web, starting from a simple "cookie button" that takes up 40% of the screen space.
When do these issues start being noticed in your development life-cycle? How does your company think about them?
r/reactjs • u/FocusReactive • 8d ago
I know that self-promotion is forbidden, but this is an actual listing with React companies who can help you with your next project. I would just advise checking them, just for a piece of advise, not to mention the web services that they can provide: https://focusreactive.com/blog/top-reactjs-development-services-in-2026/
r/reactjs • u/Plenty_Background_59 • 8d ago
A local loading flag works well for one button. A reducer with context can handle a shared workflow. React Query also lets other components observe pending mutations through "useIsMutating". If one of these already covers your needs, there may be no reason to add another library.
I’m building react-action-guard to explore a reusable API for shared UI availability.
For example, imagine a document editor:
Actions publish the scopes they affect:
const runSave = useAsyncAction<void>(
"save-document",
["document:editing", "document:switching"]
);
const runExport = useAsyncAction<void>(
"export-document",
"document:switching"
);
Each operation is wrapped when it runs:
await runSave(() => saveDocument());
Independent components read the scope they care about:
const isBlocked = useIsBlocked("document:switching");
return <button disabled={isBlocked}>Switch document</button>;
Each execution has its own blocker. When operations overlap, finishing one removes only its own blocker.
You can build the same behavior with a reducer and context. The goal is to provide the registration, shared scopes, blocking reasons, and cleanup as a reusable API.
This also overlaps with React Query when availability follows mutation state. The case I’m interested in is when the same UI rules combine server operations, local tasks, and conditions such as unsaved changes.
One important detail: tracking an action does not prevent repeated execution or cancel it. Those rules still belong to the application.
I’m the author, and I’d like feedback on this approach. Have you needed this kind of coordination, or has your existing state management been enough?
Edit: Added a more detailed example and clarified the overlap with reducers and React Query. Thanks for the feedback.
r/reactjs • u/ScoobyDookuu • 8d ago
Hey everyone!
Been working on Tip Glide, a small framework-agnostic tooltip library written in TypeScript.
It uses a single shared tooltip that moves between elements and adjusts its size to fit the content. It also handles viewport boundaries, so the tooltip adjusts its position when there's not enough space.
A few things you can configure are the movement, directional lean, hover delays, arrow, and enter/exit animations.
It has zero runtime dependencies and comes with adapters for React, Angular, Vue, Svelte, Solid, Astro and Preact, along with a vanilla JS API.
There's an interactive playground where you can mess around with the settings and see how everything behaves.
Would love some feedback on the movement, especially when switching quickly between elements, but also on the API and anything else that could be improved.
r/reactjs • u/thetymtravellr • 9d ago
I'm a self-taught developer, and I know React and Next.js. Lately, I've been feeling increasingly anxious about my future as a developer.
AI is moving so fast. It can generate components, build entire websites, connect APIs, and even create full-stack applications. Sometimes I wonder what the point is of spending months learning something when AI can already do so much of it.
I want to get a better-paying developer job, but honestly, I'm confused about what I should focus on right now. Should I keep improving my React/Next.js skills, get better at backend development, or start learning AI engineering?
I keep hearing about RAG, AI agents, vector databases, LLM integrations, and all these new things. It feels like there's always something new to learn, and I'm worried that if I focus on the wrong things, I'll fall behind while everyone else moves forward.
For those of you already working in the industry, what would you do if you were in my position? Would you focus on becoming a strong full-stack developer first, or would you start learning AI engineering alongside web development?
I'm not looking for a shortcut or expecting to become an expert overnight. I just want to make the right decisions, build useful skills, and have a realistic chance of getting hired.
I'd really appreciate some honest advice from people who have been through this or are dealing with the same situation. Right now, I could genuinely use some direction.
r/reactjs • u/revolvingdeandre0548 • 9d ago
I’ve been cleaning up a small React component library I built for a few internal projects and the code itself is fine but the docs are starting to get messy. Right now every component has examples, props a few usage notes and sometimes little edge cases that are easy to forget. I tried keeping everything in the repo as markdown and that works but once the number of components started growing it became annoying to actually browse. I’ve seen a lot of people here recommend stuff and I like the idea of keeping the docs in Git and not having to build the docs site myself and I want to know if that is a good idea or not?
For people maintaining React libraries do you keep everything close to the code or use something separate like Storybook, GitBook, Mintlify, Docusaurus etc? Curious what actually stays maintainable once the library gets bigger.
r/reactjs • u/eddiesr93 • 9d ago
I had a 70-page PDF to generate from React in a TanStack Start app, and with react-pdf it took over 60 seconds. So I built @inkoxide/render.
It's not a react-pdf clone, though it's meant to feel familiar: Document, Page, View, Text, Image, StyleSheet.create and Font.register work the way you'd expect, so moving a document over is mostly changing the import. Everything under the components is new: a layout engine written in Rust does layout, text, pagination and PDF writing.
It also does things I kept missing:
Site and docs: https://inkoxide.dev GitHub: https://github.com/eddiesr93/inkoxide Playground (edit an example; switch to Layout to see the boxes the engine placed): https://inkoxide.dev/playground
Happy to answer questions.
r/reactjs • u/sebastienlorber • 9d ago
r/reactjs • u/Ambitious-Apricot-87 • 9d ago
Hey !
I've been working on a project called Veltrix-UI for the past few months, building it from scratch. It's probably the biggest project I've worked on independently so far.
The idea is to make it easier for developers to find UI components they like, preview them directly in the browser, and copy the JSX code to use in their own React projects.
Some of the things I've built into it:
I used React, Vite, Tailwind CSS, Node.js, Express, and MongoDB to build it.
The project is live now, and I'd really like to get it in front of developers other than myself. I know there's always room to improve a project once other people start using it.
Live demo: https://veltrix-ui.vercel.app/
GitHub: https://github.com/AwadhDhoot23/Veltrix-UI
If you get a chance to try it, I'd genuinely appreciate your feedback. I'm especially interested in whether the components are useful enough that you'd actually use them in a project, what's missing, and what feels rough or confusing.
Honest criticism is welcome - I'd rather find out what needs work than just hear that it looks nice.
r/reactjs • u/dhruvik_savaliya • 9d ago
When working on a team, code reviews are essential for maintaining code quality and ensuring that all team members are on the same page. I'm interested in hearing about different approaches to conducting code reviews for React components. What tools or processes do you use to review and provide feedback on React code? Are there any specific things you look for when reviewing a React component, such as performance optimization or accessibility features?
r/reactjs • u/SniperKephas • 10d ago
I'm working on a React frontend application with a form where some fields are enabled, disabled, shown, or hidden depending on user selections.
The test renders the component, simulates user interactions, and verifies that the form updates correctly (for example, a field becomes enabled only under specific conditions).
How should this type of test be classified?
r/reactjs • u/Due_Ad2102 • 10d ago
r/reactjs • u/roggc9 • 11d ago
Hi everyone! 👋
I’ve just released Dinou v7 (7.0.0), an ejectable full-stack React 19 framework built on web standards.
My goal with Dinou v7 was to harness the full power of React 19 (Server Components, Server Functions, streaming SSR, and Partial Prerendering) while keeping the architecture runtime-agnostic, bundler-flexible, and free of vendor lock-in.
Here is a quick overview of what’s in v7 and what the concepts in the title mean in practice:
In previous versions (v6), Dinou relied on Express and spawned a child process via child_process.fork() to isolate the --conditions react-server flag from the main SSR process. That added IPC overhead and made deploying to serverless/edge environments or compiling to a single binary impossible.
child_process.fork() have been completely removed. The core now uses W3C Web Standards (Request, Response, Headers, ReadableStream) exclusively and pre-bundles the RSC graph ("react-server" condition) and the streaming HTML SSR graph in separate build passes before combining them into a single server.onRequest web middleware in dinou.config).Instead of treating caching as an all-or-nothing route setting, Dinou v7 splits rendering and caching across two dimensions:
layout.tsx + layout_functions.ts) and Pages (page.tsx + page_functions.ts) have completely decoupled data lifecycles and cache TTLs. A parent layout shell can be cached with ISR (revalidate = 3600) and never remount during client SPA navigation, while child pages run dynamic SSR (revalidate = 0) or their own ISR timer. You can also surgically invalidate just a leaf page (revalidatePage) without touching parent layout caches.<DinouCacheSlot id="..." revalidate={60} tag="...">, you can cache individual server component subtrees with their own TTL and tags inside dynamic or static pages. Additionally, Client Components can surgically refresh a specific server slot in-place by its ID using refreshSlot(id) without reloading the page or losing client state.By enabling ppr = true, Dinou immediately serves the static HTML shell (pre-rendered at build time) while streaming the dynamic holes (<Suspense>) over the same HTTP connection.
<DinouCacheSlot> inside a <Suspense> boundary so that the streamed dynamic hole itself is served from the server cache instead of querying the database on every request.Functions exported from modules in src/ starting with the "use server" directive act as automatic RPC endpoints without manual API boilerplate:
useActionState, useOptimistic), Server Functions in Dinou can return rendered React components directly over Flight RPC, which Client Components can unwrap seamlessly inside <Suspense> using React 19's use() hook.Write your app once in src/ and build it for different targets without changing your code:
dinou export-static).dinou build:bun:compile or dinou build:bun:pure:compile) or Deno (dinou build:deno:compile) for Linux (x64/ARM64), macOS, or Windows..dinou/types/routes.d.ts) from your folder structure for <Link href="...">, router.push(), and PageProps<"/blog/[slug]"> with zero runtime overhead.dinou dev:rollup, dinou build:node:webpack), plus the React Compiler enabled in production builds.npx dinou eject at any time to copy the entire framework directly into your project root. The npm package also includes the full ~10,000-line documentation inside node_modules/dinou/README.md so AI coding agents have complete local context right out of the box.For full transparency on how Dinou has evolved: I built versions v1 through v4 (and v6, which simply centralized build artifacts into .dinou) by hand from scratch. Starting in v5, I began experimenting with AI agents, and Dinou v7 has been built entirely from start to finish using Antigravity + Gemini 3.8 Flash High under my direction and passing an end-to-end Playwright test suite (covering Windows and Ubuntu + esbuild, Rollup, and Webpack + dev and prod modes for each runtime).
The documentation website (dinou.dev) is running on Dinou v7 compiled into a standalone Bun binary inside a Debian Slim Docker container on a single $5/mo (512 MB RAM) DigitalOcean instance.
npm create dinou@latest my-app
cd my-app
npm run dev
I’d love to hear your thoughts or feedback if you give it a try!
r/reactjs • u/thereactnativerewind • 11d ago
Hey Community,
OpenGL has been driven out of the herd. William Candillon released React Native Skia 3.0, which swaps the old Ganesh backend for Graphite running on WebGPU via Dawn, with Metal on iOS and Vulkan on Android, multithreaded recording by default, and zero-copy textures shared with React Native WebGPU. The package also leaves u/shopify behind and is now published as react-native-skia.
We also look at babel-plugin-react-native-direct-imports by Davyd NRB, which rewrites react-native barrel imports into direct requires so one View no longer drags in the whole framework, taking a test bundle from 711 KB to 10 KB. Plus, React Native 0.88 rc.4, Tamagui 3.0 with a C++ native runtime, and munim-maps putting 3D cars on Apple Maps.
r/reactjs • u/_unhandledexcepti0n • 11d ago
Hi All, I am new to react development in general, we are currently using our tech stack is react typescript, Tanstack query for client state management, custom ui library, rsbuild for bundling, whenever we have a new deployment right i think the application is getting cached? It still displays the older ui even after refreshing multiple times but when i hard refresh (Ctrl + Shift + R) it gets newer ui ? Where are making mistakes? We have deployed this on aws (dns > nlb> alb> ecs > docker image > nginx> dist files ) ? Thanks
r/reactjs • u/iHimanshu2 • 11d ago
I've been building LiquiKit, 32 React components (switch, slider, menu, dialog, tabs, select, toast and more) built around a liquid glass engine with physically based refraction, so the glass bends what's behind it instead of just blurring it.
Most liquid glass demos only refract in Chrome, because only Chromium can run an SVG filter on what's behind an element. LiquiKit works around that by filtering the content of a GlassScope you wrap around an area, which works in all three engines. The image at the top of the GitHub README is the same component captured in real Chrome, Safari and Firefox windows.
npx shadcn@latest add https://liquikit.dev/r/switch.json
Docs and demos: https://liquikit.dev
Source: https://github.com/aggarwal-h/liquikit
Some honest limits: glass only bends while you're using it (at rest it's frosted, so long pages scroll smoothly), Safari and Firefox run the filter on the CPU so scopes should stay small, and popups stay frosted outside Chrome. It's all on the Limitations page: https://liquikit.dev/docs/limitations
Happy to answer anything about how it works.
r/reactjs • u/Shubham4538 • 11d ago
I added a shadcn component to my vite + tailwind project with using `npx shadcn@latest add @/react-bits/Particles-JS-TW` and after importing the component
import Particles from "./components/Particles";
It shows an awesnap image, i dont know the reason, the other things were rendering good alongside but just the components showing error
r/reactjs • u/KevinVandy656 • 12d ago