Project to set up a "Hello world" with rails-react gem. It consist of 2 routes, the root that's connected to the HomeController index action, and the RandomGreetingsController index action. The home/index View is rendering the App React Component, which is the Router for the React side of the Full Stack App with the only route of the home page to render the Greeting component, but with a structure to scale to add more routes.
The React state is managed with Redux, so every time the page refresh, the Greeting component dispatch an action through the redux configuration, to the /random_greetings route that is in charge of getting a sample from all the Greetings in the Postgres Database.
- rails-react
- react-dom
- redux
- react-router
- fetch
- HTML
- CSS
- rspec
- ffaker
- factory_bot_rails
To get a local copy up and running follow these simple example steps.
Go to the top of the page, press te green button that says "Code", and copy the link. Then you have to go to your console and type
git clone 'repository-link'
That's all, you are ready to go!
Run the following command to have all yarn packages dependencies installed:
bundle install
npm install
rails db:create
rails db:migrate
rails db:seed
To run the "react-scripts start" script, type the following command:
rails s
To run the rspec test files for Rails controller type the following
rspec
To run the Rails Rubocop rules, type the following
rubocop
To run the CSS linters type the following
npx stylelint "**/*.{css,scss}"
- GitHub: Jose Abel Ramirez Frontany
- Linkedin: Jose Abel Ramirez Frontany
Contributions, issues, and feature requests are welcome!
This project is MIT licensed.
Give a ⭐️ if you like this project!