March 2019
Intermediate to advanced
534 pages
14h 52m
English
Here's a simple example that changes a regular text input into a password input that prevents the value from displaying on the screen:
import React, { useState } from 'react';import TextField from '@material-ui/core/TextField';export default function PasswordFields() { const [password, setPassword] = useState('12345'); const onChange = e => { setPassword(e.target.value); }; return ( <TextField type="password" label="Password" value={password} onChange={onChange} /> );}
Here's what the screen looks like when it first loads:

If you change the value of the Password field, any new characters remain hidden, even though the actual ...
Read now
Unlock full access