React frontend?
Since I already have build a frontend for my application. Could you provide some instructions on how I would render the frontend with React instead of regular views?
Perhaps this is a nice addition to jumpstart since react is hot and has several advantages. Be more than willing to back port UI in react in return.
Perhaps not the core parts of jumpstart but only my own application logic.
Would prefer to have the react components be as transparant implemented as possible ( I would back port them from a BlitzJS application )
Perhaps this is a nice addition to jumpstart since react is hot and has several advantages. Be more than willing to back port UI in react in return.
Perhaps not the core parts of jumpstart but only my own application logic.
Would prefer to have the react components be as transparant implemented as possible ( I would back port them from a BlitzJS application )
If you want to use a react frontend, you may consider using the JSP Rails app only as an API that you consume through react.
Rails (and thus I assume JSP) has a different approach to js frontends: instead of using big frameworks like react or vue (with all their bagage in additional tooling and conventions), Rails goes for a minimal approach using Hotwire/StimulusJS. This also saves us from having to implement templates and sometimes business logic twice (for backend AND frontend), while still having a modern js frontend.
Honestly: If you want to get the best of JSP, you should stick with Rails conventions and go for Hotwire. But if you want to use react, I would simply set up an API only Rails application (this is explicitly supported in Rails) and consume that from react.
If however you still want to build a hybrid (full stack) Rails app WITH react components, you might want to check out the Vue with Rails screencasts at GoRails. They're not react, but the way how you can include such a JS framework with Rails is pretty similar.
Rails (and thus I assume JSP) has a different approach to js frontends: instead of using big frameworks like react or vue (with all their bagage in additional tooling and conventions), Rails goes for a minimal approach using Hotwire/StimulusJS. This also saves us from having to implement templates and sometimes business logic twice (for backend AND frontend), while still having a modern js frontend.
Honestly: If you want to get the best of JSP, you should stick with Rails conventions and go for Hotwire. But if you want to use react, I would simply set up an API only Rails application (this is explicitly supported in Rails) and consume that from react.
If however you still want to build a hybrid (full stack) Rails app WITH react components, you might want to check out the Vue with Rails screencasts at GoRails. They're not react, but the way how you can include such a JS framework with Rails is pretty similar.
A middle option is to add in your react components - Jeremy's post here helped me get that setup: https://jeremydye.fyi/2022/01/15/rails-7-and-react-install-guide/ and he's also using JSP: https://jumpstartrails.com/discussions/deploying-to-heroku-with-react-rails-gem#post_3746
I had a simple existing site using next.js and tailwind styling, so once I got react working it was easy to copy over the components. You can see an example of a page with react + JSP here: https://www.codecat.ai/ai-react-generator
I had a simple existing site using next.js and tailwind styling, so once I got react working it was easy to copy over the components. You can see an example of a page with react + JSP here: https://www.codecat.ai/ai-react-generator
Notifications
You’re not receiving notifications from this thread.