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

Create a useStateLazy method which takes a callback #277

Merged
merged 2 commits into from
Mar 2, 2023

Conversation

marklam
Copy link
Contributor

@marklam marklam commented Mar 1, 2023

This means that if your default state is expensive to create, you don't need to create one (just to be discarded) every time the component is rendered.

Copy link
Member

@JaggerJo JaggerJo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Josua Jäger <jaeger.josua@gmail.com>
@JaggerJo JaggerJo merged commit 200bae3 into fsprojects:master Mar 2, 2023
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

2 participants