Skip to content

Commit 7a2e9f8

Browse files
committed
Add "Other new features" section for reuseChunkedInstances and LegacyElementMixin's built-in disable-upgrade support.
1 parent 3b6494b commit 7a2e9f8

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

CHANGELOG.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,27 @@ This update to Polymer includes some new [global settings](https://polymer-libra
123123

124124
Components can override the global setting by setting their `_legacyForceObservedAttributes` property to `true`. This property's effects occur at startup; it won't have any effect if modified at runtime and should be set in the class definition.
125125

126-
**Should I use it?** This setting should only be used if startup time is significantly affected by Polymer's class initialization work - for example, if you have a large number of components being loaded but are only instantiating a small subset of them - but is otherwise **not recommended**.
126+
**Should I use it?** This setting should only be used if startup time is significantly affected by Polymer's class initialization work - for example, if you have a large number of components being loaded but are only instantiating a small subset of them. Otherwise, this setting is **not recommended**.
127+
128+
### Other new features
129+
130+
#### `<dom-repeat>`
131+
132+
- `reuseChunkedInstances`
133+
134+
**What does it do?** This boolean property causes `<dom-repeat>` to reuse template instances even when `items` is replaced with a new array, matching the Polymer 1 behavior.
135+
136+
By default, a `<dom-repeat>` with chunking enabled (i.e. `initialCount` >= 0) will drop all previously rendered template instances and create new ones whenever the `items` array is replaced. With `reuseChunkedInstances` set, any previously rendered template instances will instead be repopulated with data from the new array before new instances are created.
137+
138+
**Should I use it?** This flag is generally recommended and can improve rendering performance of chunked `<dom-repeat>` instances with live data.
139+
140+
#### `LegacyElementMixin`
141+
142+
- `disable-upgrade`
143+
144+
**What does it do?** `LegacyElementMixin` now has built-in support for the `disable-upgrade` attribute (usually provided by [`DisableUpgradeMixin`](https://polymer-library.polymer-project.org/3.0/api/mixins/disable-upgrade-mixin)) that becomes active when the global `legacyOptimizations` setting is enabled, matching the Polymer 1 behavior.
145+
146+
**Should I use it?** Consider using this setting if you are already using the `legacyOptimizations` setting and migrating older components that depend on `disable-upgrade` without explicit application of `DisableUpgradeMixin`.
127147

128148
## [v3.3.1](https://github.com/Polymer/polymer/tree/v3.3.1) (2019-11-08)
129149
- [ci skip] bump to 3.3.1 ([commit](https://github.com/Polymer/polymer/commit/11f1f139))

0 commit comments

Comments
 (0)