r/reactjs • • 7h ago

Resource We recently cut down our React GitLab CI pipeline from ~15 min to 6 min using memoization and I have some thoughts to share

14 Upvotes

We are a three-person team where tech lead is more focused on management than technical work, so we often end up reinventing the wheel due to gaps in our knowledge. Recently, we realized we were waiting 15 minutes for an image to build on every push and usually we have to make two to three commits to get all pipeline stages passing (AI not doing its job properly and test coverage falls short.)

That's when I looked more into our React repo’s GitLab CI pipeline. The historical median was 14m 48s (p90 24m 51s). Earlier runner and test-suite updates had already brought runs down to about 9 minutes. After applying memoization across our jobs, the median was 6m 19s, with a best run of 5m 07s.

Here are the changes we made:

  • Decoupled install from test:unit and enabled the shared S3 npm cache keyed by package-lock.json. Install dropped from ~110s to 45–54s.
  • Skipped lint, typecheck, and test:a11y on pushes that don’t touch app code using rules:changes and optional: true in downstream needs.
  • Gave test:unit two modes. It runs the suite when test inputs change. On no-code pushes it fetches prior test and coverage artifacts via CI_JOB_TOKEN so our policy gates still pass. Reuse took 17–18s versus 2m 20s for a full run. We also replaced grep | head -1 with a single awk command after SIGPIPE caused an exit 141 under pipefail.
  • Moved Kaniko’s --cache-repo to the GitLab Container Registry after ECR returned a 403 for cache-layer uploads. The final image still goes to ECR. The build took 2m 20s cold and 36s warm on an unchanged-source push.

While none of this is groundbreaking, I got to implement it for our team and cut a real daily bottleneck—and I feel good about it.

https://medium.com/@veldt/how-i-cut-my-gitlab-ci-pipeline-from-18-minutes-to-5-minutes-using-memoization-cd743108702d

Personal Blog


r/reactjs • • 1h ago

Show /r/reactjs I built an open-source, Notion-style editor in React that keeps your notes as plain Markdown files

0 Upvotes

Disclosure: this is my own project.

I'm a solo developer and I've spent the last two years building Lydie. It works a lot like Notion (blocks, / commands, databases with table, board and calendar views), but your notes are plain Markdown files in a folder you own.

  • Source (AGPL-3.0): https://github.com/lydiehq/lydie
  • React 19 with the React Compiler, TipTap for the editor, and Electron for the desktop app
  • Every feature is a plugin, including the built-in ones
  • Saving a note only changes the lines you edited, so the rest of the file stays as it was

On AI: I've been a professional developer for more than 5 years, and Lydie started before I used AI tools much. I use Claude with intention and a lot of iteration. Happy to answer technical questions.

I'd love feedback :)


r/reactjs • • 6h ago

Upgrading to ESLint 10 with eslint-plugin-react: why it passes locally and fails in CI, and a fix

0 Upvotes

If you've tried ESLint 10 with eslint-plugin-react, jsx-a11y or import, you've probably hit ERESOLVE or getFilename is not a function. None of the three has released ESLint 10 support yet.

What I found:

  • npm install -D eslint@10 in an existing project only warns, so it looks fine. npm ci in CI then fails.
  • The crash comes from settings.react.version: "detect" calling a function ESLint 10 remove

The manual fix is an npm overrides entry per plugin plus wrapping your config in fixupConfigRules from u/eslint/compat (details in the README).

I wrote a CLI that does it and proves your lint output didn't change: npx eslint-unstick --fix.

Repo: https://github.com/Raj-json/eslint-unstick. Feedback from real projects is very welcome, especially where it fails.


r/reactjs • • 1h ago

Needs Help React 18 → 19, worth it if we don't need any of the new stuff?

0 Upvotes

My team wants to upgrade our app from React 18 to 19 and I'm kind of the only one against it.

It's a client-side SPA (Vite, TS, React Router , Keycloack), no SSR. I went through what 19 adds and honestly I don't see anything we'd use. Actions, useOptimistic, server components, none of that fits how the app works right now. So to me it's a bunch of testing for no real gain.

Their argument is basically "we'll have to do it at some point anyway."

Is there anything I'm missing that would make it worth it?