You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add documentation and general guidance around using FASTElement #7516
There is currently some misunderstandings common to developers that are not addressed in the documentation. Some is covered in the MDN docs but could use elaboration.
Best practices list:
The constructor should primarily be used for setting up default values and assigning event handlers
The connectedCallback may fire while the constructor is still executing as the constructor is not blocking
The connectedCallback should be used for any component setup that is not related to the default values
Identify common scenarios and how to overcome them if data is coming in after default or initial values have been applied - an example of an indeterminate progress element may be useful here.
It is expected that change handlers for attributes and observed properties fire during initialization, from null to a value for attributes and undefined to a value for observed properties
Could there be a case for no-op on an observed property here during first run? This could avoid a conditional check.
What's considered an initial value? an assignment in the constructor sets the value during construction, but an author may consider attributes present on the tag as being "initial values". These attribute values can't be set and won't fire observables until the connectedCallback finishes, since that fires against the opening tag (which is where those values exist).
What's considered an initial value? an assignment in the constructor sets the value during construction, but an author may consider attributes present on the tag as being "initial values". These attribute values can't be set and won't fire observables until the connectedCallback finishes, since that fires against the opening tag (which is where those values exist).
I'll re-word, I mean default value (which is initial value but provides a better understanding).
Activity
radium-v commentedon May 13, 2026
What's considered an initial value? an assignment in the
constructorsets the value during construction, but an author may consider attributes present on the tag as being "initial values". These attribute values can't be set and won't fire observables until theconnectedCallbackfinishes, since that fires against the opening tag (which is where those values exist).janechu commentedon Jun 4, 2026
I'll re-word, I mean default value (which is initial value but provides a better understanding).