-
Notifications
You must be signed in to change notification settings - Fork 1
Consider null as defined #1
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
Comments
One step closer to datavis-tech/reactive-model#12 |
Wait, depends on datavis-tech/reactive-property#1 |
Done |
Exposed in reactive-model 0.3.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to create components with optional properties, we need some way of specifying that a reactive property intentionally is defined to be no value. For example, the optional properties for color and size in configuring a scatter plot like this:
Previously, with ModelJS, optional values that have no value were specified using
Model.None
, a special object for this purpose inspired by Scala's Option Type. However, after reading this great article on null vs. undefined, I realized thatnull
is actually meant for this purpose, and that's why it is distinct fromundefined
.Therefore, it would be a Good Idea to consider
null
as a defined value within reactive-function. This would mean that if an input to a reactive function has been assignednull
, then that reactive function will be invoked.The text was updated successfully, but these errors were encountered: