Beginner here, working on a toy project. I have a simple page with a form. Users can enter data into the various fields.
I can see the inputs with console.log('formData end state: ', formData), but when I try to print the formData using
const CharacterDisplay: React.FC<CharacterDisplayProps> = ({ formData }) => {
return (
<div>
<h3>
Character Details:
</h3>
{Object.keys(formData).length > 0 ?
(<pre>{JSON.stringify(formData, null, 2)}</pre>)
: (<p>No character data available.</p>)}
</div>
);
};
I'm getting the "no character data available" result
I have a few misc bugs I'm working on that might possibly be related, but those I can solve, but this issue I'm really not sure where to begin on resolving. Any idea what I might be missing? Can send more code. Just not sure where the problem might be yet.