Polymer/old-docs-site

Properties outside the properties object

Open

#2,463 opened on Feb 6, 2018

View on GitHub
 (3 comments) (0 reactions) (0 assignees)HTML (2,482 forks)batch import
P3docsgood first issuequestion

Repository metrics

Stars
 (1,013 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

From @hadriann on February 5, 2018 17:31

Description

The usage of properties outside of the properties object is not documented. From the docs:

In most cases, a property that's part of your element's public API should be declared in the properties object.

It is implied that there are use cases when you need not declare a property in the properties object.

One such use case might be a component's private property (like a config), that is set by the component itself (not received via attributes), and passed down to one of its children.

There are a few questions regarding this:

  1. Is the above scenario (or any scenario) a valid use case for outside-the-properties properties?
  2. Will basic data binding work for such properties?
  3. Will computed data binding work?
  4. Will such a property be bound at the first render (ready) of the markup?
  5. What is the best practice (Polymer-way) to declare or use such private properties?

Copied from original issue: Polymer/polymer#5093

Contributor guide