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
When using symbols as keys of wire adapter configurations, depending on whether that wire config contains values that are considered dynamic, or all values are static, a different behavior becomes apparent in terms of how these symbols are treated.
Description
When using symbols as keys of wire adapter configurations, depending on whether that wire config contains values that are considered dynamic, or all values are static, a different behavior becomes apparent in terms of how these symbols are treated.
Steps to Reproduce
https://stackblitz.com/edit/salesforce-lwc-eqtkfa?file=src%2Fmodules%2Fx%2Fapp%2Fapp.js
This way of using a symbol works fine:
whereas as soon as dynamic values are involved, it doesn’t work:
The differences becomes apparent in the compiled outcome. Here's what the version with only non-dynamic values produces:
and here's the outcome of the dynamic one:
Expected Results
Symbol keys work fine in all cases.
Actual Results
Symbol keys only work for non-dynamic wire configurations. As soon as dynamic values come into play, the symbol keys get transformed into string keys.
Version
The text was updated successfully, but these errors were encountered: