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

Is ObjectProperty handling of value: 0 intentional? #42

Open
TomerAberbach opened this issue Dec 7, 2024 · 0 comments
Open

Is ObjectProperty handling of value: 0 intentional? #42

TomerAberbach opened this issue Dec 7, 2024 · 0 comments

Comments

@TomerAberbach
Copy link
Contributor

ObjectProperty checks if (props.value) {...} to decide whether to use it, which means it ignores zero.

I found that surprising and expected it to maybe only ignore null and undefined.

I guess in general I would find it helpful to have some documentation on what values of Child should/will be ignored/filtered by components and which will be kept.

Right now I'm working around this in my code with typeof value === 'number' ? String(value) : value

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

No branches or pull requests

1 participant