onChange is set to change event handler functions thats used to set the email and password states to the inputted values. Get form data in ReactJS. ReactJS: Modeling Bi-Directional Infinite Scrolling . 01 How to get form data from input fields in React 02 Solution 1 03 Solution 2 04 Solution 3 05 Final Words Solution 1 Suggestions: 1. Exercise: In React, mutable state is typically kept in the state property of components, and only updated with setState (). This time we are going to fire an OnChange event whenever the text changes in the text box.