It's time to introduce a "View" to our codebase so that we can present the values in the DOM. Since React is the most popular View library, we'll convert our basic JavaScript project to a React project to demonstrate how this pattern fits.
We'll create several hooks (useCallback
, useListener
, useBroadcaster
) in this section to see how you could implement the pattern in react terms.
By the end of the section, you'll know how user input is handled and how to fetch resources in React with this pattern
You're in Section 06 of Composing Closures and Callbacks in JavaScript