r/tauri • • 3d ago

Using React?

I am making apps with tauri and before always used it with Vanilla JS/TS, however I recently wanted to use Libraries such as a Liquid Glass Library and Shadcn when I realized that they need React to work,
Now I don't know why I should switch to React except for those 2 Libs to work like it seems overkill

Is there something im missing or is that literally the only thing that react is worth for?

0 Upvotes

6 comments sorted by

3

u/Flick9000 3d ago

Check out Basecoat UI, it'a fork of shadcn that doesn't require React.

1

u/TachyonFactory 3d ago

For simple utilities, Vanilla JS/TS is totally fine. React really only pays off in Tauri when your UI has lots of interconnected state synced with Rust events, and since Tauri uses the OS WebView, React's bundle size adds almost no overhead.

1

u/mrleblanc101 1d ago

If you're doing an advanced app, I really don't see why you wouldn't use React+Shadcn or Vue.ja+Shadcn-vue instead of vanilla JS. It's much easier to manage complex UI and state and develop using a framework

1

u/TheRNGuy 6h ago

You should use it even without any libs. 

Though you can decide for yourself after trying JSX or TSX, why React (or similar frameworks like Next, React Router, or Remix 3) are better than vanilla JS (+ generating html (what are you using for backend to generate html?)