Rails and React with Redux Flow
Rails and React with Redux Flow = Rails Project and Functioning Flow for the Project
........................................................................................................................................................
First Request :: Request From Browser to Rails-App to React -App
Browser --------- Routes ---------- API Controller --------------- Front End
Second Request :: Request From React-App to Rails-App
React-App ---------- Rails-Routes -------------- Rails Controllers and Models ---------React -App
Step 01: Create New Rails Project with Web packer and React ::
rails new rails-react-tutorial --webpack=react
Step 02: Make sure the Webpacker and React-Rails Gems installed
Step 03: Add Controller Class and routes to our Rails App::
Step 04: Generates a new React Component
rails generate react:component HelloWorld greeting:string
Step 05:Use our React Component
Step 06: Add React Router
npm install --save react-router-domyarn install
Step 07: Using React router
Step 08: Adding Redux, Sages,Babel Polyfill, and Axios
Step 09: Set up Redux State Store
Step 10: Create Configure Store.js
Step 11: Now import it in app.js to use it as redux
Step 12: Add and Action and Router ::
Comments
Post a Comment