UI to surface Alpine.js eval errors
See original GitHub issueAlpine.js uses console.warn
in the following scenarios:
- ~~x-if/x-for on a non-
template
https://github.com/alpinejs/alpine/blob/ee019cbc66d2adb3e5126bf3822d9d701a40daf8/src/utils.js#L29~~ #141 - ~~
template
with more than 1 child node https://github.com/alpinejs/alpine/blob/ee019cbc66d2adb3e5126bf3822d9d701a40daf8/src/utils.js#L31~~ #141 - error during expression evaluation https://github.com/alpinejs/alpine/blob/5cc46c31b08e4b25821fb85fd0fad6903bc7e574/src/utils.js#L69
I believe some developers suppress console.warn
, it would be nice to surface the relevant errors/warnings:
- in a “warnings” tab in the devtools
- highlight the offending components/elements (toggleable through settings)
For 1. and 2. we should probably re-scan the DOM and to figure out which are the offending Moved to a separate issue to have additional structural checks #141template
’s.
For 3. the console.warn
contains the element as well as the expression.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:28 (13 by maintainers)
Top Results From Across the Web
CSP
Under the hood, Alpine doesn't actually use eval() itself because it's slow and problematic. Instead it uses Function declarations, which are much better, ......
Read more >How to pass refs to a component in alpine js 3?
Then, I get to know that functions called init are auto invoked in Alpine v3 (https://alpinejs.dev/directives/init#auto-evaluate-init-method).
Read more >Django, HTMX and Alpine.js: Modern websites, JavaScript ...
Most server-side libraries make it equally easy to surface validation errors for those questions as they do questions like "Is this Password no ......
Read more >the Alpine crust-mantle boundary | Geophysical Journal ...
Each sub-interface depicts the smoothest possible (i.e. simplest) surface, fitting the reflector data within their assigned errors.
Read more >Evaluation of an ERTS-1 Data Collection Platform Installed ...
surface layer. J. Appl. Meteor., 9, 857-861. Evaluation of an ERTS-1 Data Collection Platform Installed in the Alpine Tundra, Colorado.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think in terms of the content hierarchy I prefer the footer. Also feels like there’s more space in that layout with less at the top.
@HugoDF As you said we can totally change it if we don’t vibe that layout in practise.
The 2nd one in is my favourite. The separator is nice, but I also like the last one with the different BG colour.