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

Setting a prop default to true results in always true even when prop is set to false #177

Open
hennessyevan opened this issue Nov 27, 2024 · 0 comments

Comments

@hennessyevan
Copy link

hennessyevan commented Nov 27, 2024

I can't really see where in the code but it seems like prop.init's logic is using an || to apply the default where it probably should be a ??

In the reka demo, I set a new prop showTitle and set it to true by default, I then use this to conditionally show the title
image

If I want to set that to false and hide the title, showTitle still evaluates to true
image

I tried to look for where prop.init is being used here but I couldn't find it, I'll keep digging and am happy to contribute a PR for this once I find this.

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