December 2019
Intermediate to advanced
598 pages
12h 21m
English
In React, we can use what is called controlled components to implement a form. A controlled component has its value synchronized with the state in React. This will make more sense when we've implemented our first controlled component.
Let's open our project in Visual Studio Code and change the search box in our app header into a controlled component by carrying out the following steps:
import { ChangeEvent, FC, useState } from 'react';import { Link, RouteComponentProps, withRouter,} from 'react-router-dom';
export const Header: FC<RouteComponentProps> ...
Read now
Unlock full access