Thunks are a popular way to avoid directly causing side effects in our actions, action creators, or components, thus allowing us to keep the rest of our application pure (easier to test, reason about, re-use). Thunks are the simplest way to deal with AJAX requests in a redux application.
Students will understand the need to isolate side-effects to a particular stage of the redux cycle.
Students will be able to integrate the redux-thunk
libary into a redux application and use it to make AJAX requests.
It seems that students have not yet covered redux middleware in any previous module, which is a prerequisite for learning about thunks.
The instructor will demo the use of thunks in a sample application based upon the following codebase and accompanying video lecture:
@johnptmcdonald this gist is currently public rather than unlisted, which means my fork of it also is public instead of unlisted. Could you switch this to being a secret gist? Thanks (& hope you are well!).