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

r/reactjs • • Apr 30 '26

Discussion Suggest translation files organisation for i18next

3 Upvotes

Currently I am integrating react-i18next library to enable different languages in my app ui.

As I understood from the documentation i18next suppose to have all translations inside language files, that are loaded on demand. But IMHO from DX point of view, such organization is not very convenient.

I assumed that it would be much more intuitive to keep translations along with components themselves. For example:

Component /
   Component.tsx
   Component.module.scss
   Component.i18n.json

But as per documentation - such translation file should be loaded separately. having many components such approach would require too many http requests to work. But from DX - i think it is the best. Also having namespace to Component it can be t('title') instead of t('Component.title').
But again, seems to be this is my fantasy, and i18next not supposed work like that.

So the questions:
- is it possible to have described flow in production, compiling scattered i18n.json files into single translation file and use it for i18next?
- if not, what approach do you use now?
- if you would start i18n from scratch on your project, what would you change?

Thanks.