

The index.js files in each folder are barrel files that group all the exported modules together so they can be imported using the folder path instead of the full module path and to enable importing multiple modules in a single import (e.g.Vue export default I prefixed non-feature folders with an underscore "_" to group them together and make it easy to distinguish between features and non-features, it also keeps the project folder structure shallow so it's quick to see everything at a glance from the top level and to navigate around the project.
REDUX STORE CODE
Inside the src folder there is a folder per feature (App, HomePage, LoginPage, RegisterPage) and a bunch of folders for non-feature code that can be shared across different parts of the app (_actions, _components, _constants, _helpers, _reducers, _services).
REDUX STORE HOW TO
The tutorial used in the video is available at React + Node.js on AWS - How to Deploy a MERN Stack App to Amazon EC2.ĭeploying the React App to Microsoft Azureįor instructions on how to deploy the React app to Azure with a real backend api built with ASP.NET Core and SQL Server see React + ASP.NET Core on Azure with SQL Server - How to Deploy a Full Stack App to Microsoft Azure.Īll source code for the React + Redux tutorial app is located in the /src folder. This video shows how to setup a production ready web server from scratch on AWS, then deploy the example React + Redux app and configure it to run with a real Node.js + MongoDB backend api.
REDUX STORE REGISTRATION
For a real backend API built with ASP.NET Core 3.1 follow the instructions at ASP.NET Core 3.1 - Simple API for Authentication, Registration and User Management.For an API built with NodeJS and MySQL follow the instructions at Node.js + MySQL - Simple API for Authentication, Registration and User Management.To run the auth example with a real backend API built with NodeJS and MongoDB follow the instructions at NodeJS + MongoDB - Simple API for Authentication, Registration and User Management.You can build your own backend api or start with one of the below options: The boilerplate code uses a fake / mock backend that uses browser local storage for managing application data, to switch to a real backend api you just have to remove a couple of lines of code from the main react entry file ( /src/index.jsx). Running the Tutorial Example with a Real Backend API Start the application by running npm start from the command line in the project root folder, this will launch a browser displaying the application.įor more info on setting up a React development environment see React - Setup Development Environment.
REDUX STORE INSTALL

Running the React + Redux Tutorial Example Locally - Built tutorial with React 15.4.2 and Webpack 2.2 - The code for this version of the react tutorial is available on GitHub at.- Updated tutorial to React 16.0.0 and Webpack 3.6.- Updated tutorial to React 16.4.0 and added auto-logout on "401 Unauthorized" response from the server.- Created real backend API with NodeJS and MongoDB at NodeJS + MongoDB - Simple API for Authentication, Registration and User Management.- Created real API backend with ASP.NET Core 2.1 at ASP.NET Core 2.1 - Simple API for Authentication, Registration and User Management.- Updated tutorial to React 16.7.0 and Webpack 4.28.- Updated components to map action creators to props instead of calling dispatch directly.- Updated to React 16.12.0 and posted tutorial on how to deploy the React app to AWS with a Node.js backend.- Updated to React 16.13.1 as well as other package dependencies to fix npm audit warnings.Here it is in action: (See on StackBlitz at ) The tutorial project is available on GitHub at. The tutorial example is a React + Redux Boilerplate application that uses JWT authentication, it's based on the code from a real world secure web application I developed for a law firm in Sydney recently.įor an extended version that includes email verification, role based authorization and forgot password functionality see React Boilerplate - Email Sign Up with Verification, Authentication & Forgot Password. In this tutorial we'll cover how to implement user registration and login functionality with React and Redux. Next.js: Next.js 13 + MongoDB, Next.js 11.React: React 18 + Redux, React 17 + Recoil, React 16 Hooks + Redux.
