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.

What’s the reason for using the leading _ there?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

18reactions
hfjallemarkcommented, May 11, 2018

My initial reaction is that it feels kind of hacky and like a workaround when you prefix names like that, something you would only do internally in your code if needed — not in the public api of your library that your users will have to see. If it’s only a naming convention the Polymer team uses for protected methods I would recommend not polluting lit-element’s public api with that, it is definitely not a well-established naming convention that everyone wants to use.

6reactions
hfjallemarkcommented, May 11, 2018

@Lodin but is it really realistic that the 6 lifecycle methods in lit-element would ever collide with somebody’s public api properties? Enough to warrant the underscores?

Personally, as a React developer I love the idea of lit-element – being able to build web components the way I build React components. But that naming convention is really off-putting, makes it feel like it’s a work-in-progress.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Render: Cloud Application Hosting for Developers
Render is a unified cloud to build and run all your apps and websites with free TLS certificates, global CDN, private networks and...
Read more >
Render Definition & Meaning - Merriam-Webster
render suet. also : to extract by melting. render lard. b. : to treat so as to convert into industrial fats and oils...
Read more >
Render Definition & Meaning - Dictionary.com
to cause to be or become; make: to render someone helpless. ; to do; perform: to render a service. ; to furnish; provide:...
Read more >
Render - Wikipedia
Rendering (computer graphics), generating an image from a model by means of computer programs ; Architectural rendering, creating two-dimensional images or ...
Read more >
Render - Definition, Meaning & Synonyms | Vocabulary.com
Render is a synonym of make — technically it means "cause to become." An illness might render you unable to walk, or a...
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