Skip to content

Controlled components in Crank #105

Answered by ryhinchey
ryhinchey asked this question in General
Discussion options

You must be logged in to vote

So FWIW I don't need to use a generator here if I don't expect this component to render after the first yield. The generator brings value if I want to safely maintain the email and password values as state over subsequent updates to the component (like prop updates).

While this works in React land, you never do it because those values aren't state and get blown away on every re-render.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@ryhinchey
Comment options

@brainkim
Comment options

@ryhinchey
Comment options

@brainkim
Comment options

@brainkim
Comment options

Answer selected by brainkim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants