Loading tutorials
useState, JavaScript closures, and basic browser APIs such as document.2 min readuseState, JavaScript closures, Promises, and basic fetch. This chapter focuses on effects that connect a component to something outside React.1 min readuseState, JavaScript closures, Promises, and fetch. A closure is a function together with the variables captured from its surrounding scope. In an effect, a closure can capture an old prop or state value.2 min read