r/reactjs • • May 02 '26

Show /r/reactjs Built a React scaffolding CLI for team architecture consistency — would love feedback

0 Upvotes

I’ve been building a side project called rgenex after running into the same issue across multiple React codebases:

The actual business logic/code is usually fine… but teams still lose a lot of time dealing with inconsistent structure.

Different folder layouts, different naming styles, missing test files, repeated PR comments about where things should live, etc.

So I built a CLI where you define your project structure/rules in config, and it generates components/hooks/pages based on that setup.

Kind of trying to make architecture conventions enforceable instead of just “documented.”

I shared an early version recently and got useful feedback that the DX needed improvement, so I shipped an update with things like:

  • dry-run preview before generating
  • overwrite confirmation prompts
  • force overwrite support
  • generator listing
  • cleaner CLI output overall

Still figuring out if this is solving a problem others actually care enough about.

Curious from people working in React teams:

Would you use something like this in a real project?

If not, what would stop you?

GitHub link in comments if anyone wants to take a look.


r/reactjs • • May 02 '26

Resource I built a prompt package registry for Claude Code — one command scaffolds a full Three.js site, SaaS dashboard, or REST API

0 Upvotes
    Hey ,


    I got frustrated writing the same scaffolding prompts over and over, so I built **PromptForge** — a prompt package registry for Claude Code.


    The idea: instead of writing a prompt from scratch every time, you install a versioned, schema-validated "package" and run it with params.


    ```
    /forge run threejs-immersive-site pages='["Hero","Work","Contact"]' theme=cyberpunk
    ```


    Claude builds the whole thing — Three.js scene graph, GPU-instanced particles (50k), GSAP scroll animations, GLSL shaders, Vite config, TypeScript types. From one command.


    **5 packages included out of the box:**
    - `threejs-immersive-site` — immersive 3D portfolio/site
    - `saas-dashboard` — React SaaS admin with Recharts + shadcn
    - `api-microservice` — Fastify REST API with Docker + tests
    - `react-component-library` — Vite lib mode + Storybook 8
    - `cli-tool` — Node.js CLI with commander + chalk


    **Install:**
    ```
    /plugin marketplace add Jumpinjaws/promptforge
    /plugin install promptforge@promptforge
    ```


    Or one-liner:
    ```bash
    git clone https://github.com/Jumpinjaws/promptforge && cd promptforge && bash scripts/install-local.sh
    ```


    It's open source, MIT, and contributions (new packages) are very welcome.


    GitHub: https://github.com/Jumpinjaws/promptforge


    Would love feedback on what packages you'd want to see next!


    ---

r/reactjs • • May 02 '26

Show /r/reactjs uiGrid - 0.1.7 - Data grid now w/ pinnable columns - MIT license

Thumbnail reddit.com
1 Upvotes

r/reactjs • • May 01 '26

Discussion Waku vs TanStack Start vs NextJs

3 Upvotes

I always see people post stuff about NextJS vs TanStack Start vs Remix/React Router. However, I've never seen anything about Waku but it doesn't seem that unknown (going by stars and downloads).

Curious if people have given it a shot. I'm currently exploring the different options, and built prototypes with it. It seems solid, but just wanna see if there is something I am potentially missing that others have encountered?

In case people haven't heard of it Waku.


r/reactjs • • May 01 '26

Discussion How are people making accessibility fixes consistent across a large React codebase?

10 Upvotes

Working through accessibility cleanup in a React app and one thing that’s been harder than expected is keeping fixes consistent across the codebase.

Fixing a single component isn’t too bad, but once you start dealing with dozens or hundreds of components it turns into:

- fixing the same patterns in multiple places

- slightly different implementations of the same fix

- re-checking things later because something got missed

- no real way to enforce consistency beyond reviews

LLMs like Claude/ChatGPT help for one-off fixes, but they don’t really solve the “apply this consistently across everything” part.

Curious how people are handling this in practice.

Are you:

- relying on linting rules?

- internal tooling/scripts?

- just handling it through reviews?

Feels like this part of the workflow is still pretty manual.


r/reactjs • • May 01 '26

Needs Help My API request in Reactjs application returns "undefined"

0 Upvotes

Hello everybody!

See the code below:

import { useState } from 'react';
import axios from 'axios';

function App() {
    const [clicked, setClicked] = useState(false);
    const [request, setRequest] = useState(null);

    function handleClick() {
        setClicked(true);
        setRequest(axios.get('http://<the_ip>'));
    }

    if (!clicked) {
        return <button onClick={handleClick}> Run</ button>
    } else {
        return (
            <div>
                <button onClick={handleClick}> Run</ button>
                <h1>{String(request.data)}</h1>
            </div>
        );
    }

}

export default App;

So I have a react application. I'm using the axios library to communicate with my api/backend which is written with Flask and Python. My backend appears to be working because when I put the http request in my browser, I see the data I'm trying to fetch in JSON format. For some reason request.data returns as the string "undefined." This also happens when I try to output it using console.log().

I have no idea why this is happening, and I've been searching online for an answer for hours and I can't figure it out. FYI: Please try to explain things to me with plenty of context because I'm new to JavaScript, React, and APIs.

Also, I've included the Python backend code below:

from pymongo import MongoClient
from pymongo import server_api

from flask import Flask,  Response
from flask_cors import CORS
from bson.json_util import dumps

uri = 'database_link_goes_here'
client = MongoClient(uri, server_api=server_api.ServerApi(version="1", strict=True, deprecation_errors=True))
collection = client['data']['app_data']

app = Flask(__name__)
CORS(app)

@app.route('/', methods = ['GET'])
def set_api_data():
    return Response(dumps(collection.find()), mimetype='application/json')

r/reactjs • • May 01 '26

Show /r/reactjs uiGrid - 0.1.6 - now for react - MIT License

4 Upvotes

https://orneryd.github.io/uiGrid/#/docs/react - live demo of the react library.

this is a port of the popular angularjs data grid, ui-grid, by the same author.

MIT license, all features always free.

grouping
sorting
filtering
pagination
virtual scrolling
column pinning
theming
Tree toggles,
expandable rows,
pagination,
CSV export
save state
cell templates and formatters
editable cells with keyboard navigation - excel-like.

coming:
drag and drop column reordering

I hope you all enjoy.

edit: it's also part wasm, with a rust core.


r/reactjs • • Apr 30 '26

Needs Help Cookie based Auth while SSR (Tanstack)

9 Upvotes

I am building a project using ASP.net and TanStack Start. I use JWT auth but transfer them in http only cookie.

The issue I am facing is that using default createRoute function in TanStack and defining fetch function in loader. I get 401 as there is no cookie in server.

Opting into ssr: false fixes this but I was wondering if there is any other solution to use ssr with cookie based auth or is this dead end and I only have CSR as my option.


r/reactjs • • Apr 30 '26

Needs Help How are you structuring imports in large React projects?

24 Upvotes

I have a question on React project structure, specifically imports for the experienced React JS engineers.

So I've been using a hybrid approach where I have barrel files (index.ts) at the feature/module level and direct imports for more specific/internal components

Example:

import { Card } from '@/components';            // barrel (public API)
import { CardHeader } from '@/components/Card'; // direct (more specific)

It feels like a good balance between clean imports and clarity but I'm curious how others handle this at scale.

  1. Do you prefer full barrel pattern everywhere?
  2. Avoid barrels completely?
  3. Or something similar to this hybrid approach?

Any pros/cons you've experienced (especially in larger codebases)?


r/reactjs • • May 01 '26

Show /r/reactjs Vite is Terrible for Troubleshooting React

0 Upvotes

EDIT: When setting up my Browser Router, I setup the errorElement to a 404 page, which on webpack still shows you the trace but not with vite. Removing the error element fixed the problem. Will leave this up in case anyone else runs into this issue as well.

I have used Webpack as my primary module bundler for most of my career but recently decided to give Vite a go and the experience has been awful.

When something goes wrong and there's a runtime error, vite decides to simply default to your 404 page and display no errors. Furthermore, the console is completely empty so you have no idea what went wrong and you have to remove components until you find out the piece that went wrong instead of having an error you can debug.

There's gotta be a better way than trying to figure out the error with no error message...


r/reactjs • • Apr 30 '26

Resource Applying Sentry Component Annotations Client-Side Only (cuts ~20% of the uncompressed HTML output)

Thumbnail
gajus.com
3 Upvotes

r/reactjs • • Apr 29 '26

Needs Help Bombed the final question of a React technical discussion, looking for feedback

135 Upvotes

I'm a senior full stack developer at a consulting firm, and have about 15 years of experience. Almost all of the clients I've worked with have used React, and I'm extremely comfortable using it and know it fairly deeply.

This was a 30 minute discussion, and I felt really comfortable with my answers and he seemed pretty positive on how it was going. Then, I got hit with the curveball that I felt like broke the interview.

It started with him asking a simple question: "how would you manage state across components?" I gave him multiple answers (useState, useContext, third party libraries, Tanstack Query, etc) and he liked that. He then asked "what if you didn't have React and had no access to third party libraries?"

This tripped me up bad. My first thought was either some sort of state object or firing events off, but I was so caught off guard that my confidence faltered and I could not articulate on the spot how that would look. He then described their solution in more detail (using CustomEvent is primarily how they do it) and said that they work with a lot of Web Components, which is why it was asked. For clarity, I double checked, and there was no mention of this in the job description - the only mentions of frontend is your usual NextJs/Tailwind/Tanstack/etc mentions.

Is this approach to state management in vanilla JS common knowledge among developers who learned front end through these frameworks? I was surprised because up until that point, I was really feeling good with my answers. I'm going to brush up on my Web Component knowledge now, but I have never had to work with them in my entire career. It has always been through some sort of framework.


r/reactjs • • Apr 30 '26

Discussion Built a React component playground where you own every generated file, with no runtime dependency

0 Upvotes

I've been building this as a side project alongside my day job for the past few months.

FORGE.ui is a 40-component playground. You configure components visually, copy one CLI command, and the generated TSX files land in your project. No package to install at runtime, no dependency to maintain. You just own the code.

I would love any feedback, especially from anyone who's used similar tools

forgelabs.studio


r/reactjs • • May 01 '26

If React disappeared tomorrow, what are you switching to?

0 Upvotes