Hello Rails React
Connect previous knowledge with new knowledge as we get .
a chance to use thereact-rails
gem.
This gem allows you to build React components as a part of your Rails JavaScript and serve it in a component, react_component, to be used in a regular ERB file.
Built With
- Rails 7 ~ Ruby Web development framework
- React, Redux, Routers ~ Javascript Libraries
Getting Started
To get a local copy up and running follow these simple example steps
- From your terminal enter in sequence
git clone https://github.com/od-c0d3r/hello-rails-react
code hello-rails-react
Available Scripts
In the project directory, run in order:
-
npm install
- Install the project dependencies.
-
rails db:create
- Creates the project database.
-
rails db:migrate
- Creates the tables in the database.
-
rails db:seed
- Populate the tables with default records.
-
rails server
- Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
- Runs the app in the development mode.
-
./bin/webpack
- Combine React app modules.
- You might run up with error :
opensslErrorStack
In that case run in terminal :export NODE_OPTIONS=--openssl-legacy-provider
- You might run up with error :
- Combine React app modules.
-
[EXTRA]./bin/webpack-dev-server
- The page will reload when you make changes to any of Js modules.
Coders
👤 Omar Rashad
- GitHub: @od-c0d3r
- LinkedIn: @omarrashad
🤝 Contributing
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Show your support
Give a ⭐️ if you like this project!
License
This project is MIT licensed.