Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

setState should allow functional arguments to return nil #63

Closed
LPGhatguy opened this issue Apr 10, 2018 · 2 comments · Fixed by #64
Closed

setState should allow functional arguments to return nil #63

LPGhatguy opened this issue Apr 10, 2018 · 2 comments · Fixed by #64
Labels
feature: planned A feature that's been accepted into the project's roadmap.

Comments

@LPGhatguy
Copy link
Contributor

This is a feature that I really wanted when working on Roact-Rodux. I overlooked it in the initial pull request!

See: https://x-team.com/blog/react-render-setstate/

@LPGhatguy LPGhatguy added the feature: planned A feature that's been accepted into the project's roadmap. label Apr 10, 2018
@AmaranthineCodices
Copy link
Contributor

So returning nil from the function aborts the re-render and state update?

@LPGhatguy
Copy link
Contributor Author

Yup!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature: planned A feature that's been accepted into the project's roadmap.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants