Loading tutorials
useState, how HTML forms submit named fields, the FormData API, and how async functions and promises work. You also need React 19 or a framework that ships it.3 min readuseState, async functions, and the basics of HTML forms. It explains the mechanism behind the pending flag that useActionState returns later in this tutorial.2 min readuseState, the HTML FormData API, and async functions. It also assumes you are using React 19. Here you will learn the hook's three arguments, its three return values, and how they connect to a form.2 min readuseState, the FormData API, and async functions. It also assumes you have seen the useActionState signature from the previous chapter. Here we focus on the function you pass as the first argument.2 min readuseActionState call. You should know the action receives the previous state and a FormData object, and returns the next state. You should also be comfortable with useState and plain JavaScript objects.2 min readuseState, the FormData API, and async functions. You should also have seen the useActionState signature from the earlier chapters.3 min readuseActionState is called, what an action function receives (prevState and FormData), and how to read isPending. Here you will handle invalid input as part of the state.2 min readuseState, and the FormData API. You should also have seen a basic useActionState form with an action function that returns the next state.2 min readuseActionState with a form action. You should also be comfortable with FormData and async functions. The chapter shows how a child component can read the pending state of its parent form without receiving2 min readuseState, and the useActionState signature from earlier chapters. It covers calling the dispatcher from places other than a form.2 min readuseActionState basics: the action receives the previous state and FormData, and returns the next state. You should also be comfortable with async functions and promises.3 min readuseActionState signature, and how an action function returns the next state from prevState and FormData. It covers what changes when the action is a server function.2 min readuseActionState returns the next state from an action, and how isPending reports a submission in progress. Here you add useOptimistic, which shows the expected result right away instead of waiting for the server.2 min readuseState, async functions, and the FormData API. It also assumes you have used useActionState with a form, as in the earlier chapters. Here we look at the mistakes people make most often and how to handle failures so the form stays usable.2 min read