arrow_backBACK TO DRILLS
White BeltuseeffectlockPREMIUM

Storing fullName in State via useEffect

A component derives a value using state and an Effect:

REACT_MODULE // 0x42
const [fullName, setFullName] = useState('');
useEffect(() => { setFullName(firstName + ' ' + lastName); }, [firstName, lastName]);

Why is this pattern considered unnecessary in React?

lock

This Drill is Locked

This is a premium drill. Continue on to the next free drill in the sequence.

CONTINUE DRILLarrow_forward
BugDojo
BlogFAQ

© 2026. Carved in code.