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.

Lost static parts and fields information + top level caller

See original GitHub issue

I was wondering if there is any way to retain this information from the tagged template. The static parts could be used as a cache key for the output of the html`` call.

It’s also useful to know which parts are the fields/holes. Lastly knowing which h call is the root node or top caller.

For the runtime a wrapper function would do the trick I think but babel-plugin-htm compiles to raw h('div', {}, h('span')) calls.

That might need something like

wrap(() => h('div', {}, h('span')), statics, ...fields);

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
developitcommented, May 1, 2020

@luwes seems like a useful change, and should be easy to land since its under a flag.

@jviide is also working on a faster replacement for this that we believe may outperform compiled JSX in all aspects.

1reaction
zaygraveyardcommented, Jan 22, 2020

Since html is a template string literal tag, you can just wrap it

const whtml = (statics, ...fields) => wrap(() => html(statics, ...fields), statics, ...fields);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Call stack - Wikipedia
In computer science, a call stack is a stack data structure that stores information about the active subroutines of a computer program.
Read more >
Dimensions and measurements - Call Quality Dashboard (CQD)
Get detailed information about the dimensions and measurements used by the Call Quality Dashboard (CQD) for Microsoft Teams and Skype for ...
Read more >
RF Safety FAQ | Federal Communications Commission
Frequently asked questions about the safety of radiofrequency (RF) and microwave emissions from transmitters and facilities regulated by the FCC.
Read more >
Bug descriptions — spotbugs 4.7.3 documentation
A pack call causes components to be realized. As they are being realized (that is, not necessarily visible), they could trigger listener notification...
Read more >
What does "static" mean in C? - Stack Overflow
A static variable inside a function keeps its value between invocations. A static global variable or a function is "seen" only in the...
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