Hyperapp: Can we export h from app?

Created on 9 Dec 2017  路  3Comments  路  Source: jorgebucaran/hyperapp

This is how you import your hyperapp goodies:

import { h, app } from "hyperapp"

I was thinking, what if we did it like this instead:

import app from "hyperapp"

// or

import { app } from "hyperapp"

So, where did h go? Well, it's a prop of the app function.

const { h } = app
Discussion Inquiry Wontfix

Most helpful comment

No, please.

app may be needed in places, where h not needed (because we import ready to use Components).

h may not be needed in places, where app app needed.

All 3 comments

No, please.

app may be needed in places, where h not needed (because we import ready to use Components).

h may not be needed in places, where app app needed.

@dmitry-vakhnenko agree :+1: :100:

Named exports win for me every time. Pretty relevant article.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jorgebucaran picture jorgebucaran  路  4Comments

SkaterDad picture SkaterDad  路  3Comments

ghost picture ghost  路  3Comments

jamen picture jamen  路  4Comments

jorgebucaran picture jorgebucaran  路  4Comments