January 2020
Intermediate to advanced
530 pages
11h 11m
English
We are handling two kinds of inputs in our app: text-based and file-based inputs.
The text-based inputs are handled by the onInputChangeUpdateField method. It tracks any changes in the text input fields and updates the values to the state fields array, where it can be accessed by the other methods of the app, as follows:
onInputChangeUpdateField = (name,value) => { let fields = this.state.fields; fields[name] = value;this.setState({ fields }); };
The file-based inputs are handled by three change handlers, one for each type of file (invoice, BOE/BOL, and other document).
It listens to any file selection events. If a file is selected, it fetches the details of the file and adds it to the app state. It ...
Read now
Unlock full access