Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/BookOfGreg/react-rails-example-app
Minimal basic demonstration React-Rails sample application using Webpacker
https://github.com/BookOfGreg/react-rails-example-app
react-rails sprockets webpack-es6
Last synced: 3 months ago
JSON representation
Minimal basic demonstration React-Rails sample application using Webpacker
- Host: GitHub
- URL: https://github.com/BookOfGreg/react-rails-example-app
- Owner: BookOfGreg
- License: mit
- Created: 2017-09-28T11:01:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T05:34:56.000Z (almost 2 years ago)
- Last Synced: 2024-05-28T07:02:50.777Z (5 months ago)
- Topics: react-rails, sprockets, webpack-es6
- Language: Ruby
- Size: 950 KB
- Stars: 91
- Watchers: 3
- Forks: 48
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Open-Source-Ruby-and-Rails-Apps - react-rails-example-app - Minimal basic demonstration React-Rails sample application using Webpacker 🔥 (Happy Exploring 🤘)
README
# React-Rails Demo Application
This repo is an example of a simple working Rails 5, Webpack(er)3, React-Rails 2.3+ application.
Where generators are used, the git commit will be the command ran to get to the current application state so it will hopefully be easy to follow along at home.
## How to test the Demo Application
#### 1) Install the JS packages:
```sh
$ yarn install # or npm install
```#### 2) Install GEM packages:
```
$ bundle install
```#### 3) In one terminal run the rails server:
```
$ rails s
```#### 4) In another terminal run the webpack server:
```
$ ./bin/webpack-dev-server
```#### 5) Visit the welcome page
```
http://localhost:3000/welcome/index
```## Branches
This repo contains two trees, one Webpacker and one Sprockets.
Each branch illustrates a react-rails ability.
* [`master`](https://github.com/BookOfGreg/react-rails-example-app) -> Webpacker 3
* [`sprockets`](https://github.com/BookOfGreg/react-rails-example-app/tree/sprockets) -> Sprockets 3
* [`rails-production-version`](https://github.com/BookOfGreg/react-rails-example-app/compare/sprockets...rails-production-version?expand=1) -> Sprockets 3 + serving production prebundled react
* [`rails-assets-sprockets`](https://github.com/BookOfGreg/react-rails-example-app/compare/sprockets...rails-assets-sprockets?expand=1) -> Sprockets 3 + using Rails-Assets.org (failed)
* [`generate-new-component`](https://github.com/BookOfGreg/react-rails-example-app/compare/master...generate-new-component?expand=1) -> Webpacker 3 + new style component
* [`without-ujs`](https://github.com/BookOfGreg/react-rails-example-app/compare/master...without-ujs?expand=1) -> Sprockets 3 + removing UJS and making component globally accessible
* [`jsx-file-example`](https://github.com/BookOfGreg/react-rails-example-app/compare/master...jsx-file-example?expand=1) -> Webpacker 3 + file named .JSX
* [`coffeescript-example`](https://github.com/BookOfGreg/react-rails-example-app/compare/master...coffeescript-example?expand=1) -> Webpacker 3 + Coffeescript WITH JSX