Home Page Icon
Home Page
Table of Contents for
Cover
Close
Cover
by Ezekiel Chentnik, Darío Cravero, Art Muller, Karl Purkhardt, Troy Mott, Johannes
Developing a Redux Edge
Preface
Who is this book for?
What do you need to know prior to reading?
1. Why Use Redux?
Managing state is problematic
How Redux helps
Redux background
The birth of Redux
Redux influences
Elm
ES6
Functional programming
Immutability
Flux
Unidirectional data flow
Two way data binding
The three principles
Single source of truth
State is read only
Changes are made with pure functions
Looking ahead
Conclusion
2. Core Concepts
Actions
What are actions used for?
The shape of an action
Action creators
Maintaining your action shape
Actions need an interpreter
Reducers
What are reducers?
Using reducers in Redux
Reducers are composable
Store
Middleware
Why does middleware exist?
Anatomy of a middleware
How to use middleware
Store enhancers
How does Redux work?
getState()
dispatch(action)
subscribe(listener)
Connecting Redux to our UI
The basic renderer
The path to React
The path to Angular 2
State
Conclusion
3. Redux Patterns
Improving functions
Concise functions
Extracting parameters
Reducer patterns
Adding elements to arrays
Removing elements from arrays
Changing object properties
Adding properties to objects
Removing properties from objects
Conclusion
4. Building the Sample App
Application specification
Actions
Views
Storage
Setting up
Methodology
Stack
Getting started
Implementation
Action creators
Reducers
Modifying state without a library
Selectors
Connecting to UI
Conclusion
5. Syncing Data with the Server
Application specification
Actions
Server
Implementation
Api module
Action creators
Updating reducers
Saving a note to the server
Fetching notes on initial render
redux-thunk alternatives
Conclusion
6. Showing Request State to Users
App spec
Pending, success, and failure states
Toast notifications
Implementation
Logger
Requests
Toasts
Cleanup
Conclusion
7. Persisting State on Client
How much to persist
Automatic vs manual persistence
Manual persistence
Persisting state
Restoring state
Automatic persistence
Persisting state
Refactoring
Production Use
Conclusion
8. Analytics Middleware
Why is this useful?
Middleware Specification
Creating the middleware
Augment actions
Further refactoring
Accessing our entire state within our track function
Final implementation
Conclusion
9. Best Practices
Actions
Disambiguation
Reducers
Reducer initial state
Selectors
Tips
Middleware, store enhancers
Tips
Project Structure
Organizing by Concept Type
Organizing by Feature or Domain
Alternatives
General Insights
UI, Rendering Tips
Developer tools
Testing Tips
Conclusion
10. Going offline
Using Service Workers in your app
Implementing a middleware that can selectively store and sync data based on actions
Offloading the store’s work to workers
Recommended reads
Conclusion
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
Developing a Redux Edge
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset