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.

Rename h to createNode.

See original GitHub issue

Summary

Like the title says. I considered, createElement too, but as you know, h returns a virtual node, not a DOM element.

ES modules.

import { createNode as h, app } from "hyperapp"

From a CDN.

const { createNode: h, app } = hyperapp

Why?

  • Easier to document.
  • Self-documenting.
  • More aesthetically pleasing.

Plan of action

Export h and createNode in the upcoming 1.2.0 release and remove h from 2.0.0.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:12
  • Comments:21 (14 by maintainers)

github_iconTop GitHub Comments

4reactions
rajaraodvcommented, Mar 5, 2018

“h” is pretty standard ever since Preact made it popular. I think we should just keep it “h”

1reaction
frenzzycommented, Mar 5, 2018

If docs will continue use h (import { createNode as h } from "hyperapp"), then this change makes no sense IMO.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to rename a node right after creation with jsTree jQuery ...
So everything works fine except renaming the node. I did following: //create node (inside handler of contextmenu) ...
Read more >
Renaming nodes | Python for Houdini - YouTube
... with the « createNode ()» method, depending on your needs. Houdini 19 / Python 3 SideFX Docs: https://www.sidefx.com/docs/houdini/ h.
Read more >
Rename nodes - SideFX
You can change the name of a node, or mass-rename a bunch of nodes at once using find-and-replace. On this page. How to....
Read more >
How to Rename a Node? - MSDN - Microsoft
Hi is there a function to rename a node in an xml document because i cant find one. I.e. <Rename this> blah blah...
Read more >
Rename nodes according to their own variable in python script?
I'm working on a couple of wrapper functions around connectAttr, setAttr, etc, but I'm having trouble with createNode and the naming of ...
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