May 2019
Intermediate to advanced
496 pages
10h 38m
English
A block of code is set as follows:
const handleBlur = ({ target }) => { const result = required(target.value); setValidationErrors({ ...validationErrors, firstName: result });};
There are two important things to know about the code snippets that appear in this book.
The first is that some code samples show modifications to existing sections of code. When this happens, the changed lines appear in bold, and the other lines are simply there to provide context:
const handleBlur = ({ target }) => { const validators = { firstName: required }; const result = validators[target.name](target.value); setValidationErrors({ ...validationErrors, [target.name]: result });};
The second is that, often, some code samples will skip ...
Read now
Unlock full access