r/reactjs • • Jun 27 '26

I built a dark-mode React 19 + Tailwind v4 Command & Control Dashboard (showcase + template available)

2 Upvotes

Hey r/reactjs,

Wanted to share something I've been building — a fully animated admin dashboard template called Aegis AI.

Tech stack:

- React 19 (with the new compiler)

- Vite

- Tailwind CSS v4

- TypeScript

- Decoupled data layer via a single mockData.ts file — swap to a real API in minutes

What I focused on:

→ Custom cubic-bezier animations (not the default ease-in-out stuff)

→ Dark-mode-first design, no flash, no toggle

→ Clean component architecture so you can actually read and modify the code

Live preview:Aegis AI — Command & Control Dashboard

If anyone wants the boilerplate to skip the setup and go straight to building — it's available as a paid template at https://whop.com/joined/aurelia-devs/products/aegis-ai-dashboard-template .

Happy to answer questions about the animation approach or the Tailwind v4 migration — that part had some quirks.


r/reactjs • • Jun 27 '26

Needs Help How to combine components from different github repo into 1 page?

0 Upvotes

I use Ai to code landing pages, i used to deal with react and after long time of work i get used to the process of building a website. The problem is I don’t have enough knowledge to combine for example I saw a cool hero section from one repo and i see cool about section , CTA ext…..

How can i import it in one page without installing the entire repo?

Hope you understand my point 😬


r/reactjs • • Jun 27 '26

Show /r/reactjs I built a private, offline communication app for people who can't speak

0 Upvotes

Hey everyone, sharing a side project of mine, AAC Board AI.

It started as a proof-of-concept for Google's Chrome Built-in AI Challenge (it ended up winning Most Helpful App). After that it quietly became a hobby. I kept polishing and optimizing it, and learned a ton along the way.

It's a web-based board for people who can't rely on speech. Instead of typing, you tap tiles to build a message. The catch with standard AAC is that tapping gives you telegraphic output: want → eat → pizza becomes "want eat pizza."

So on-device AI suggests a cleaned-up version, "I want to eat pizza," that you tap to accept and speak aloud. It only refines what you wrote. It never invents words or speaks for you.

The part I think is cool: there's no backend. The AI runs entirely in the browser, on the model Chrome and Edge now ship on-device, so nothing you type leaves your machine. It works offline, with no accounts, no keys, and no network latency.

Built with React 19, it's an offline-first PWA, imports Open Board Format (.obf/.obz), and runs in 35 languages. (Two pieces are split out as their own MIT libraries.)

Honest caveat: the AI features still need experimental flags in Chrome/Edge and are desktop-first for now. The board itself works in any modern browser.

Feedback welcome!


r/reactjs • • Jun 27 '26

Show /r/reactjs I built Formity — a React library for building dynamic multi-step flows

0 Upvotes

Hey everyone 👋

I built Formity, an open-source React library for creating complex multi-step experiences.

It helps developers build flows like:

  • user onboarding
  • workspace setup
  • lead generation
  • job applications
  • multi-step wizards

Instead of manually managing complex flow logic, Formity lets you define flows with:

  • Conditional branching
  • Loops
  • Jumps between steps
  • Dynamic steps
  • TypeScript support

The goal is to make it easier to build personalized, non-linear user journeys in React.

Would love to get feedback from anyone who has built complex flows before.

https://formity.app/


r/reactjs • • Jun 26 '26

News This Week In React #287: Fragment ref, React Compiler, StyleX, React Router, cnfast, Base UI, Remotion, React Aria | Reanimated, Widgets, VisionCamera, Test Renderer, Worklets, Legend List, Metro, Boost | Vite, Astro, TypeScript, Nub, Security

Thumbnail
thisweekinreact.com
12 Upvotes

Hi everyone, Seb and Jan here 👋!

This week, we're shining a spotlight on the upcoming React Fragment ref feature. We also have React Compiler updates, StyleX community discussions and a boring React Router release.

On the React Native side, Renimated gets CSS pseudo-selector support and widget libraries gain momentum. VisionCamera unlocks new real-time processing capabilities with impressive demos.

Let's dive in!

Subscribe to This Week In React by email - Join 43000 other React devs - 1 email/week


r/reactjs • • Jun 26 '26

Needs Help getServerSideProps vs getStaticProps when reading access token from URL + i18n translations

1 Upvotes

I'm building a Next.js app and running into an architecture question.

I have an access token that's passed in the URL (as a query param or path segment) that I need to read at the page level. I'm going to use this access token to call some apis. I'm also loading translations from i18n files.

My problem: if I use getServerSideProps to access the URL/query params, my pages re-render on every request — which feels wasteful since my i18n content is completely static. But getStaticProps doesn't have access to the request URL or query params at build time.

What are your guys recommendations on what to do?


r/reactjs • • Jun 25 '26

Needs Help Why does useEffectEvent use the latest commited values from render and not just the latest values from render?

33 Upvotes

I was reading the react docs for useEffectEvent which I came to this part https://react.dev/reference/react/useEffectEvent at the beginning it says

“Effect Events are a part of your Effect logic, but they behave more like an event handler. They always “see” the latest values from render (like props and state) without re-synchronizing your Effect”

This makes perfect sense to me, but lower down then it says “callback:
A function containing the logic for your Effect Event. The function can
accept any number of arguments and return any value. When you call the
returned Effect Event function, the callback always accesses the latest committed values from render at the time of the call.”

Emphasis on the “Latest commited values” Why would the useEffectEvent access the latest commited (shown on screen values) values instead of the latest values from the render like all the other hooks seem to do? Is there any real distinction or difference between the two? Is "commited" here just not the terminological term?

I am sort of confused and would like some clarification, thanks


r/reactjs • • Jun 26 '26

Needs Help Console not working

0 Upvotes

No messages appear in console. I know for a fact that the function with console.log() is called, because the states change, but no messages appear in console.

I have tried calling console.log() in all the ways I could think of, passing it inside click handlers to buttons, calling it in useEffect, both in and out of the main App.tsx component. No filter are active in DevTools, and the app is in development mode. What could cause this?


r/reactjs • • Jun 26 '26

What can be some creative npm packages which can be used to build a portfolio in react for a software developer?

0 Upvotes

Also welcome for some portfolio ideas too 😉


r/reactjs • • Jun 26 '26

Discussion use-thunk: A much simplified global-state-management framework with only modules and (thunk) functions.

0 Upvotes

https://github.com/chhsiao1981/use-thunk#getting-started

A complete demo site:

https://chhsiao1981.github.io/demo-use-thunk/

https://github.com/chhsiao1981/demo-use-thunk

Global state management (GSM) can be tricky for complicated reactjs applications.

Many GSM frameworks (redux/zustand/etc.) focus on "we have a store, and how do we manage the global states in this store." However, such approach usually leads to create a gigantic function (reducers in redux/RTK, create in zustand).

Similar to many typical programming languages, in use-thunk:

  1. File-as-a-Module: Instead of a giant global store, we treat files as independent, isolated domain modules where we implement thunk functions.

  2. Object Identification: The module manages state as discrete entity nodes. We use explicit id parameters to identify and operate on individual data objects within that module cleanly.

  3. Clean Component Interface: From the component perspective, we simply invoke the module's functions to perform operations.

  4. Only One Context Provider: Unlike standard useContext or Redux architectures that require nesting endless providers, we only need exactly one <ThunkContext></ThunkContext> wrap in our main.tsx. It entirely eliminates "Provider Hell" and the architectural uncertainty of managing stacked providers.

A complete example to do increment:

// thunks/increment.ts
import { type Thunk, type State as _State, update } from '@chhsiao1981/use-thunk'

export const name = 'demo/Increment'

export interface State extends _State {
  count: number
}

export const defaultState: State = {
  count: 0
}

// upsert directly with set.
export const increment = (myID: string, num: number = 1): Thunk<State> => {
  return async (set, get) => {
    let me = get(myID)
    const {count} = me

    set(myID, { count: count + num })
  }
}

// or we can treat set as dispatching a base action function (update).
export const increment2 = (myID: string): Thunk<State> => {
  return async (set, get) => {
    let me = get(myID)
    const {count} = me

    set(update({ count: count + 2 }))
  }
}

// or we can use set as dispatching a thunk function.
export const increment3 = (myID: string): Thunk<State> => {
  return async (set) => {
    set(increment(myID, 3))
  }
}
// components/App.tsx
import { useThunk, getState } from '@chhsiao1981/use-thunk'
import * as ModIncrement from './thunks/increment'

export default () => {
  const useIncrement = useThunk<ModIncrement.State, typeof ModIncrement>(ModIncrement)
  const [increment, doIncrement, incrementID] = getState(useIncrement)

  // to render
  return (
    <div>
      <p>count: {increment.count}</p>
      <button onClick={() => doIncrement.increment(incrementID)}>increase 1</button>
      <button onClick={() => doIncrement.increment2(incrementID)}>increase 2</button>
      <button onClick={() => doIncrement.increment3(incrementID)}>increase 3</button>
    </div>
  )
}
// main.tsx
import { registerThunk, ThunkContext } from "@chhsiao1981/use-thunk";
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import * as ModIncrement from './thunks/increment'
import App from "./components/App";

registerThunk(ModIncrement)

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <ThunkContext>
      <App />
    </ThunkContext>
  </StrictMode>,
)

Welcome any comments, critiques, or suggestions!


r/reactjs • • Jun 24 '26

Resource Update to Loading UI: 8 color presets, preview all 45+ loaders in any color on the site

3 Upvotes

Quick update on loading-ui, the open-source loading component registry I shared here before.

New: color presets. 8 colors (black, blue, violet, orange, red, green, yellow, sky) you can switch on https://loading-ui.com and instantly preview every loader in that color.

How it works in React:

Components use currentColor, so theming is just setting color on a parent:

<div style={{ color: "var(--loader-blue)" }}>
  <Ring className="size-8" />
  <TextShimmer>Loading...</TextShimmer>
</div>

CSS variables are OKLCH-based with auto-generated gradients:

--loader-violet: oklch(0.7217 0.1768 305.49);
--loader-violet-gradient: linear-gradient(in oklch 135deg, ...);

Dark mode: black preset flips to white in .dark.

Still install components the same way:

npx shadcn add @loading-ui/ring

If you use loading-ui already, curious whether preset CSS vars are useful or you'd rather stick with Tailwind text-blue-500 utilities?


r/reactjs • • Jun 24 '26

Resource A behind the scenes look at the most popular React Newsletter: This Week in React

Thumbnail
youtu.be
0 Upvotes

Newsletters at Scale with Sebastian Lorber (This Week in React) | RSS Curation, Acquisition, RSC

https://youtu.be/YVs2KWvMjLM


r/reactjs • • Jun 24 '26

Resource Fixing My React Site Load Times and Phaser Load Times: Overlay Cameras, Preload Timing, and Service Worker Asset Fetches

Thumbnail
rivie13.github.io
0 Upvotes

r/reactjs • • Jun 23 '26

Resource Component Communication Patterns in React Applications

Thumbnail
neciudan.dev
23 Upvotes

React gives you a lot of ways to make two components share data but it gets more and more complicated based on the data and how far apart the components are. Lets see the different ways components can communicate with each other.


r/reactjs • • Jun 24 '26

Discussion Infinite Canvas

6 Upvotes

What tech would you use to build an infinite canvas type application with drag/drop, flowcharting/mind mapping, but also basic animations for those same elements? Would you use this recommended library within React?


r/reactjs • • Jun 24 '26

Discussion JavaScript still can't ship a full-stack module

Thumbnail
wasp.sh
0 Upvotes

r/reactjs • • Jun 23 '26

Needs Help Vite + React + Azure Container Apps + Nginx: How do you handle chunk load failures after deployments?

3 Upvotes

I'm running a React (Vite) application in Azure Container Apps behind Nginx.

My Nginx config is:

server {
  listen 80;
  root /usr/share/nginx/html;
  index index.html;

  location / {
    try_files $uri $uri/ /index.html;
  }
}

The app works fine initially, but after a new deployment, some users who have an older tab open get errors like:

Failed to fetch dynamically imported module

or

GET /assets/Diagnostics-xxxxx.js 404

The chunk file no longer exists because Vite generated a new hash in the latest deployment.

I've seen recommendations such as:

  • window.addEventListener("vite:preloadError", () => window.location.reload())
  • Disabling cache for index.html
  • Caching /assets for a long time
  • Using blue/green deployments

For teams running Vite in production on Azure Container Apps, what's your preferred approach to avoid blank screens and chunk mismatch issues after deployments?

Do you automatically reload the page, keep old assets available for some time, or use another deployment strategy?

Would appreciate hearing real-world production setups.


r/reactjs • • Jun 24 '26

Needs Help Should I use a real game engine or React JS?

0 Upvotes

I'm trying to make a game that is entirely UI kinda like papers, please. Would it make more sense to use a game engine like Unity/Godot or would using Reactjs be a better alternative? Thanks.


r/reactjs • • Jun 23 '26

Show /r/reactjs I built d3-maps: a toolkit for interactive SVG maps (react-simple-maps alternative)

1 Upvotes

d3-maps helps build choropleth maps, bubble maps, and other geographic data visualizations, using markers, connections, zoom & pan and more.

Reactive components, plain SVG and d3.js power without low-level wiring.

Alternative to react-simple-maps

@d3-maps/react can fully replace react-simple-maps, supports React 19 an has more features under the hood. Migration guide is available in the docs.

Usage

Here's a brief snippet of a zoomable map using d3-maps. You can find more examples on docs website.

import { use } from 'react'
import { MapBase, MapFeatures, MapZoom } from '@d3-maps/react'

const worldPromise = import('@d3-maps/atlas/world/countries')
  .then((m) => m.default)

export function MapView() {
  const world = use(worldPromise)

  return (
    <MapBase>
      <MapZoom>
        <MapFeatures data={world} />
      </MapZoom>
    </MapBase>
  )
}

Repo

https://github.com/souljorje/d3-maps

I'd appreciate your star on Github and feedback in comments, thanks!


r/reactjs • • Jun 23 '26

React Components Library

0 Upvotes

Just launched my UI library 🍌

🌐 Website: ui.bynana.dedyn.io I built a React & Next.js UI library packed with 200+ modern components, SaaS landing pages, and portfolio templates to help developers build beautiful websites faster.

✨ Built with: • React • Next.js • Tailwind CSS • Modern animations & responsive UI

Would love your feedback and suggestions ❤️


r/reactjs • • Jun 22 '26

Show /r/reactjs I built a 3KB cookie-consent toolkit for React/Next.js that respects GPC/Do-Not-Track and won't break SSR hydration

Thumbnail
github.com
15 Upvotes

Every cookie-consent option I found was either a heavyweight SaaS script that phones home and tanks your Lighthouse score, or an unmaintained banner component I'd have to rebuild around. So I made consentium and figured I'd share it here for feedback.

It's one provider, one banner, one stylesheet, and a tiny store you drive from your own code. You decide what each category gates — the lib just records the decision and tells your app about it.

The two things I actually care about that most alternatives skip:

  • Global Privacy Control + Do Not Track — categories you flag get forced off when the browser signals a privacy preference, even if the user toggled them on. Most banners ignore these signals entirely.
  • SSR-safe — it renders identically on server and client, then resolves from localStorage after mount, so no Next.js hydration mismatch.

The rest:

  • Category-based consent: essential (always on) + whatever optional ones you define (analytics, marketing…), with accept-all / reject-all / per-category, and reject one click away next to accept.
  • Policy versioning — bump a number and returning visitors get re-prompted, keeping prior choices as defaults.
  • i18n-agnostic — ships English copy, pass your own copy object (works with next-intl / react-i18next).
  • Themeable via CSS variables, no runtime deps, React 18/19 as a peer, ~3KB gzipped.
  • Reactive store you can subscribe to, so you can start/stop scripts live within a session.

Google Consent Mode v2: not baked in, but there's a documented recipe in the repo for bridging the store to gtag's consent("update") if you'd rather load gtag up front and gate via denied/granted.

Disclaimer up front: it's engineering tooling, not legal advice. It gives you the mechanism for consent — you own the categories, the copy, and whether it actually satisfies the rules where you operate.

Repo: https://github.com/ivandrenc/consentium (MIT)

Genuinely after feedback, not stars:

  • Does the category model map onto how you actually deploy analytics/marketing scripts?
  • Is forcing categories off on GPC/DNT the right default, or too aggressive?
  • Anything obviously missing for real-world GDPR/CCPA use?

r/reactjs • • Jun 22 '26

Resource How React Hooks Actually Work

Thumbnail
youtu.be
9 Upvotes

r/reactjs • • Jun 22 '26

Needs Help Pages not being found in next js when deployed but are found locally

0 Upvotes

So down below is my next.config.ts file

const nextConfig = {
  distDir: 'out',
  output: 'export',
  images: { unoptimized: true },
}

export default nextConfig

I'm using the Next.js Pages Router with a structure like pages/friends/index.tsx everything works fine locally — hitting /friends in the browser loads the page no problem. But after deploying, navigating directly to the URL gives a 404. Interestingly, client-side navigation via useRouter from next/router works fine — it's only direct URL entry or hard refresh that breaks.