March 2019
Beginner to intermediate
324 pages
7h 17m
English
Since the React framework relies on being in control of your frontend state, forms represent a challenge to this vision. This is because, in HTML forms, each input field handles its own state based on the user input. Let's say we have a text box and the user makes some changes to it; the text box will change its state based on what the user enters. In React however, it is preferred that any state change should be handled in the state object using the setState() method. There are multiple ways to handle forms in React.
We'll make use of various ways of handling HTML forms. React encourages what is known as the controlled components approach, which simply means that you design your component in a way such ...
Read now
Unlock full access