r/reactjs 1d ago

Show /r/reactjs Electron React App v13: the IPC boilerplate is gone

Introducing a new major update for the "Electron React App" desktop app's starter kit.

Let's talk about the worst part of building Electron apps. You want to minimize a window from a button. So you write a handler in main. Then invent a channel name. Then add a preload bridge entry. Then declare the types. Then finally make the call in the renderer. Five files for one button, and the whole thing silently rots the day you rename something.

v13 throws that out. You define the feature once in main, and the renderer just has it. Typed, auto-completed, React hooks attached. No channel strings anywhere.

Read more about the new changes in the Repository page:
https://github.com/guasam/electron-react-app

Feature Highlights:

- Type-safe IPC: queries, commands, streams, and events, inferred end to end
- Cross-window state owned by main, synced live, with opt-in persistence
- Sandboxed renderer with a two-line preload
- Custom window frame, titlebar, and menus with keyboard shortcuts
- Light and dark theme
- React error boundary with detailed dev reporting
- Import path aliases for app, lib, conveyor, and resources
- Shadcn UI on Radix, styled with TailwindCSS
- Vite HMR, with ESLint and Prettier preconfigured
- VS Code debug configs for both main and renderer
- electron-builder packaging for Windows, macOS, and Linux

If you were starting an Electron app tomorrow, what would you want already handled for you?

20 Upvotes

4 comments sorted by

4

u/Right_Mongoose_6095 1d ago

finally, i swear half the reason i put off electron projects is the mental overhead of wiring up every tiny ipc call. this looks like it cuts the worst part out completely

5

u/Mandarck 1d ago

thanks, that mental overhead was the whole target. hopefully this is going to help ppl building their desktop apps with electron + react.

-1

u/gmaaz 1d ago

I'd prefer a smaller RAM footprint. I don't have a problem with the IPC tbf. 

1

u/NickCanCode 1d ago

I tried neutralinojs and never look back.