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
does the theme system allow for the theme to be disabled -> missing, or overwritten with a custom theme that has an entirely different shape?
in that case these chains may fail with cannot find X of undefined.
theme?.uikit?.typography?.paragraph covers that, but could also use having a fallback/default value if it the chain ever fails.
The "riddler" approach (lol!... aka optional chaining) only avoids the dreaded Uncaught TypeError: Cannot read properties of undefined that stops and crashes an app.
An effective solution may be for the Theme Provide to allow overwriting existing default values or add new ones, but never remove/null the default theme's properties. Solves this and the need for fallbacks.
does the theme system allow for the theme to be disabled -> missing, or overwritten with a custom theme that has an entirely different shape?
in that case these chains may fail with
cannot find X of undefined
.theme?.uikit?.typography?.paragraph
covers that, but could also use having a fallback/default value if it the chain ever fails.Originally posted by @caravinci in #33 (comment)
sure we could do theme?.uikit?.button?.md?.color but then we're just posing as the Riddler.
maybe have a local of css`` which does a check for theme
The text was updated successfully, but these errors were encountered: