React and Redux Courseware (RCTRDX)
React makes creation of beautiful and capable web applications possible with much less work. It allows software developers to write ultra-modern web-based programs as part of large teams. Redux makes the management of web data extremely controllable. The combination of the two is powerful!
Using short, to-the-point TED-style lectures, this course leads you through both of these JavaScript libraries from scratch. We'll lay a foundation of the tooling for both libraries. Then we launch into an understanding of Redux from the ground-up, moving all the way into advanced topics like middleware and asynchronous Ajax calls through dispatchers. Finally, we'll learn how React works and how to integrate Redux into it.
We will get you up and running rapidly, preparing you for real-world application development with a deep understanding of React components and well-structured applications. If you are new to React and Redux, or if you've been working with it but not quite getting how it really works, this is the course for you!
Benefits
- Create a new React application from scratch.
- Use the tooling to run and debug that application
- Simplify complex state management with the Redux library
- Use best practices for reducers, dispatchers, and action creators
- Explain and leverage Redux reducer composition
- Understand when, how, and why to use Redux middleware
- Handle asynchronous operations with Redux -- including Ajax
- Understand React's custom markup language, JSX
- Design and create custom React components using the best practices
- Know the best way to apply React hooks
- Work with React props and state
- Use forms with React
- Configure and use the React Router to create robust navigation schemes
Outline
- Course Overview
- React Introduction
- What is React?
- Its origins WRT Angular
- React's 3 design principles
- Composition of components
- How is React so darned fast?
- The virtual DOM
- One-way data flow
- How a React app works - a peak under the covers
- Transpiling, bundling, minifying with webpack
- create-react-app
- The need for CRA - webpack, npm, babel, JSX, eslint, es2015, jest, etc
- Using npx
- The only build dependency needed
- Watch mode
- Ejecting
- Redux intro
- The single responsibility principle
- Why Redux?
- Why Redux with React?
- The 4 concepts of Redux
- Composition
- Immutability
- The parts of Redux
- The big picture of Redux
- Creating the store
- Installing and including Redux
- The createStore() method
- The simplest possible store
- Redux ducks
- State and Subscriptions
- Single source of truth
- Initializing state
- What goes in state and what should not
- Why subscriptions
- How to subscribe in Redux
- Actions and Reducers 101
- Actions are objects
- The shape of actions
- Type and payload
- Reducers are functions
- Why we have them
- The shape of a reducer
- Avoiding the worst Redux rookie mistakes
- Actions and Reducers
- Action Creators in a React Application
- Dispatching Actions
- Mapping Actions to prop Names
- Advanced Actions
- Action constants
- Action type enumerations
- Action creators
- Action creator enumerations
- Reducer composition
- The problem: complex state => complex reducers
- The solution: Create state slices
- Creating reducers to handle slices
- Combining reducers with Redux's built-in combineReducers
- Doing it manually
- Why manually is the right way
- Redux Middleware
- The Open-Closed Principle
- Introduction to middleware
- The next() function
- The required shape of middleware
- Middleware's super-powers
- Recipes and examples
- Why you must register middleware and how to do it
- Ajax with Redux
- The problem with async calls in Redux
- The trick to making a good middleware function
- Registering the middleware
- Dispatching an Ajax call
- Making RESTful API calls
- How to process them into redux and then into React
- Redux-thunk (Time permitting)
- The need for a thunk
- How redux-thunk fits that need
- Installing and using redux-thunk properly
- Dispatching Ajax calls with redux-thunk
- Redux-saga (Time permitting)
- Why Redux-saga?
- Saga vs. Thunk
- Handling side effects with saga
- How to create components
- 3 simple steps to creating a component
- Hosting a component
- How to display HTML
- A gentle intro to JSX
- The 7 rules of JSX
- When JSX deviates from the W3C standards
- How to display images
- Dynamic images for flexibility
- Bundling images for performance
- How to handle events
- React's synthetic events
- Passing values to the handler
- Creating your own custom events
- How to style with CSS
- Styling with CSS
- Bundling CSS files for speed
- Using npm libraries
- How to work with JS libraries
- How JS module loading works
- The two ways of importing JS libraries - when to use each
- How to display data
- Demystifying expressions - how to think about them
- Nesting JSX in expressions and vice-versa
- How to style with inline styles
- Specifying inline styles
- Importing external styles
- How to use state
- Defining state in React
- React state != Redux state
- the useState() hook
- Single values vs. Objects
- Lazy initial state
- Using spread to append
- How to run tasks around render
- The useEffect() hook
- Simulating lifecycle events
- Component loading, rendering, and unloading events
- How to conditionally display
- Why we need conditionals
- Using short-circuiting
- Using && and ||
- Ternaries
- How to display arrays
- Iterating collections
- Array.prototype methods
- .map()
- .filter()
- What does key do for me?
- How to compose and decompose
- Composition deep dive
- The reason for composition
- How to pass data down
- Data flowing down - props
- Why not 2-way binding?
- State vs props
- The useContext() hook
- How to lift state up
- Why lift state up? What it is.
- Examples of lifting state up
- Data flowing up by emitting an event
- Passing data between sibling and cousin components
- All the ways to communicate and the cleanest solution
- How to run functions in JSX
- Rules for calling functions in JSX
- The right time to run a function
- How to handle forms
- Forms in React
- Controlled vs. Uncontrolled forms
- How to solve the update problem
- The tricks handling <select>s and <textarea>s.
- How to do simple routing
- How to create a SPA in React
- Where React Router came from
- 4 easy steps to routing
- How to define the domain of a router
- How to create routes
- How to read route parameters
- The useParams() hook
- Creating route parameters
- Reading parameters
- How to make them optional
- How to process querystrings
- How to create hyperlinks
- How to route users via a link
- Why not us <a>?
- The <Link> component
- How to navigate imperatively
- How to route users via JavaScript
- The useHistory() hook
- The push() and replace() methods
- Using the <Navigate> component
Required Prerequisites
- A very strong grasp of advanced JavaScript.
Useful Prerequisites
- Solid HTML5 and CSS knowledge is helpful.
License
Length: 5
days | $200.00 per copy
What is Included?
- Student Manual
- PowerPoint Presentation