Netflix / x-element

A dead simple starting point for custom elements.
Apache License 2.0
29 stars 12 forks source link

Discussion: Consider support for a “debug” mode? #210

Open theengineear opened 5 hours ago

theengineear commented 5 hours ago

In both the XElement base class and the TemplateEngine class — we could consider adding a debug mode which could change the behavior of error reporting. This could also look like a “strict mode” as well.

The development flow would be to develop locally in some sort of strict mode where we’re willing to take some performance hits to gain insights. But, in production environments, this flag could be off — re-capturing performance where developer insights are not as important.

Things we could add in strict mode.

Things we could ditch in production.

theengineear commented 5 hours ago

I’m not yet sure where I land on this one. I think if anything — it would be cool to have a stricter mode when developing locally. But, I’m not sure if it would actually be a good idea to loosen any validations in production just yet.

Anyhow… this topic has come up on-and-off quite a bit, so I figured it’d be worth tracking with an issue thread.