Skip to content

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

Closed
curran opened this issue Apr 13, 2016 · 4 comments
Closed

Consider null as defined #1

curran opened this issue Apr 13, 2016 · 4 comments

Comments

@curran
Copy link
Member

curran commented Apr 13, 2016

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:

image

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 that null is actually meant for this purpose, and that's why it is distinct from undefined.

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 assigned null, then that reactive function will be invoked.

@curran curran closed this as completed in eef4b3a Apr 13, 2016
@curran
Copy link
Member Author

curran commented Apr 13, 2016

One step closer to datavis-tech/reactive-model#12

@curran
Copy link
Member Author

curran commented Apr 13, 2016

Wait, depends on datavis-tech/reactive-property#1

@curran curran reopened this Apr 13, 2016
@curran
Copy link
Member Author

curran commented Apr 13, 2016

Done

@curran curran closed this as completed Apr 13, 2016
@curran
Copy link
Member Author

curran commented Apr 13, 2016

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant