...

/

Connecting Form Components

Connecting Form Components

We'll cover the following...

Thus far, our application has been non-interactive. We can currently click on Pilot and Mech list items to select them, but there’s no way to modify anything. It’s time to start implementing some interactivity.

Creating the Form Update Logic

Our first task is to hook up the <UnitInfo> form so that we can edit the current unit’s name and change what Battletech House or mercenary group they’re affiliated with. We’ll need to add an action type and a case reducer to handle those updates, then modify <UnitInfo> so that it dispatches the action in response to onChange callbacks from the inputs.

Commit 3360ece: Implement initial unit info update handling

The action/reducer changes are simple. New action type, a matching action creator, and a case reducer:

...

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy