简体   繁体   English

关于使用 react 和 ruby​​ on rails 进行开发

[英]About developing with react and ruby on rails

I am planning to develop using react and rails.我计划使用 react 和 rails 进行开发。

Which of the following is common as a way to do it?以下哪一项是常见的实现方式?

1.Use gem called react-rails. 1. 使用名为 react-rails 的 gem。

2.Use Rails as an api server.(Separate projects) 2.使用Rails作为api服务器。(单独项目)

Either way works fine.无论哪种方式都可以正常工作。 It depends on how you want to structure your app.这取决于您希望如何构建您的应用程序。 If you want a self-contained app, use the react-rails gem and everything will be inside of your rails app.如果您想要一个独立的应用程序,请使用react-rails gem,一切都将在您的 Rails 应用程序中。 If you want separate apps, use a rails api and a separate react app front-end.如果您需要单独的应用程序,请使用 rails api 和单独的 React 应用程序前端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM