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
We should have better error checking and error messages in dev mode to make it easier to learn and develop in Svelte. IMO this is a must to increase widespread adoption since people trying it out will be frustrated and drop it if they don't understand what is going on within the template.
It's very cool to see what code the template is generating, but it should be a goal that you don't need to understand what is being generated to be successful using Svelte.
For example, when you have {#each items as item} in your template and items is undefined you get the error Cannot read property 'length' of undefined. It would be nicer if the error was `items` is undefined in {#each items as item}. It might even be nicer if we output the lines before and after this from the template into the console all fancy like. Perhaps an Error Framework to make it super easy to understand issues in your app.
Other places for additional error checking:
undefined/nulls in bind, e.g. { person.name } when person is null
What other errors within templates we add better error checking?
The text was updated successfully, but these errors were encountered:
We should have better error checking and error messages in dev mode to make it easier to learn and develop in Svelte. IMO this is a must to increase widespread adoption since people trying it out will be frustrated and drop it if they don't understand what is going on within the template.
It's very cool to see what code the template is generating, but it should be a goal that you don't need to understand what is being generated to be successful using Svelte.
For example, when you have
{#each items as item}
in your template anditems
is undefined you get the errorCannot read property 'length' of undefined
. It would be nicer if the error was`items` is undefined in {#each items as item}
. It might even be nicer if we output the lines before and after this from the template into the console all fancy like. Perhaps an Error Framework to make it super easy to understand issues in your app.Other places for additional error checking:
{ person.name }
whenperson
is nullWhat other errors within templates we add better error checking?
The text was updated successfully, but these errors were encountered: