question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Development build of Hyperapp

See original GitHub issue

As discussed on Slack, I’m creating this issue so we can have a discussion about having a separate build of Hyperapp that developers can use for better debugging and detailed error messages.

Why?

Today, I stumbled upon an issue where the h function wouldn’t accept a date, like {new Date()}. Which is reasonable, except I got an error that I had a hard time understanding at first, which was Uncaught TypeError: Cannot read property 'length' of undefined. You can see a reproduction of the error here: https://codepen.io/vdsabev/pen/Ewpggx

Hyperapp already has a great developer experience due to having so few concepts to learn. To make the learning process (and beyond) even easier, I think the community would benefit from enhanced error messages in cases like mine. This, however, can’t come at the cost of bloating the library - at least not in production.

This issue is about showing better errors. #388 is somewhat related - it’s about showing the errors in a better way.

An example of what React does is: react-dom.development.js:65 Uncaught Error: Objects are not valid as a React child (found: Thu Oct 12 2017 19:55:23 GMT+0300 (Eastern European Summer Time)). If you meant to render a collection of children, use an array instead.

So?

What do you all think? Approaches, examples, alternatives?

Your move.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:28 (18 by maintainers)

github_iconTop GitHub Comments

4reactions
jorgebucarancommented, Oct 12, 2017

We could start by just distributing an unminified file in dist since that would involve zero special maintenance.

3reactions
vdsabevcommented, Oct 16, 2017

From the Slack discussions, another use case @selfup bumped into: he used the obsolete root property. A development build could throw an error if any unknown properties are used in the app function call. Or show warnings for deprecated properties, including migration steps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hyperapp Working Architecture and Tools \ A quick Guide
Hyperapp is a lightweight Javascript framework for developing ... Lightweight Javascript library - HyperApp framework has build size of 1KB ...
Read more >
A Quick Introduction to Hyperapp
Developer and author at DigitalOcean. ... We'll build a small counter app to demonstrate how Hyperapp works.
Read more >
Build a To-do List with Hyperapp, the 1KB JS Micro- ...
Daz shows how build a to-do list app with Hyperapp, a pragmatic and ultralight framework ... we're going to use CodePen to develop...
Read more >
Hyperapp V2 in Under 5 Minutes
A very quick walk through of Hyperapps' UI system for those coming ... Philosophically, Hyperapp will give you the tools build complex UI ......
Read more >
Lets Build a Restaurant App with Javascript and Hyperapp js
Get Unlimited Access to Over 20+ courses that will give you the edge you need to get a job as a developer as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found