Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(core): Allow useState/useRef to initialize empty #1398

Merged
merged 1 commit into from Apr 25, 2024

Conversation

SBoudrias
Copy link
Owner

Review the typing of useState and useRef to handle being implicitly empty. Empty initialization will not raise errors anymore, and it'll automatically assume the value can be undefined.

This allow to reduce boilerplate, and arguably leads to more idiomatic code.

@SBoudrias SBoudrias merged commit c34cfec into main Apr 25, 2024
15 checks passed
@SBoudrias SBoudrias deleted the feat/type-useState-default branch April 25, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant