Skip to content

Consider null as defined #1

Closed
Closed

Description

@curran

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.

Activity

  1. curran commented on Apr 13, 2016

    @curran
    MemberAuthor
  2. curran commented on Apr 13, 2016

    @curran
    MemberAuthor
  3. reopened this on Apr 13, 2016
  4. curran commented on Apr 13, 2016

    @curran
    MemberAuthor

    Done

  5. curran commented on Apr 13, 2016

    @curran
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions