# JS or JSX for test React module?

**URL:** https://discourse.roots.io/t/js-or-jsx-for-test-react-module/30030
**Category:** sage
**Tags:** sage11
**Created:** 2025-11-03T12:47:13Z
**Posts:** 2
**Showing post:** 2 of 2

## Post 2 by @the_lar — 2025-11-06T15:06:46Z

Just coming back to this after doing more digging and finding this thread on how to integrate React and Sage11 - [How to add React support in Sage 11](https://discourse.roots.io/t/how-to-add-react-support-in-sage-11/29557) . I couldn’t get `@wordpress/element` to work, but after carrying out the steps in this guide, I’m getting somewhere.

I have a few questions, if anyone has the time to fill in a some gaps for me, I’d appreciate it…

During the setup process I installed `@vitejs/plugin-react`, `react` and `react-dom` - so my understanding is that this is full fat React, not WordPress’ bundled version of React (`@wordpress/element`) - whats the difference and is this better or worse?

What is `@vitejs/plugin-react` and what does it actually do?

I’m importing it into `vite.config.js` - does this bit: `plugins: [react()]` - actually load the plugin into Vite?

In my `app.blade.php` I’ve added `@viteReactRefresh` above the line that starts with `@vite` - whats that for?

Thank you!

---

_[View the full topic](https://discourse.roots.io/t/js-or-jsx-for-test-react-module/30030)._
