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.

Name for coming "extensions"

See original GitHub issue

PR #1036 happened. Now you can class MySwal extends Swal {.

I’m in the process of extracting features from the base Swal into layers - functions that return a class that extends the given class. We need a name for these “extensions”/“HOCs”/“decorators”/“enhancers”/“things”.

Internally they’re named “extensions” right now, but we should agree on the term to be used consistently in documentation as addon/plugin modules (like sweetalert2-react-content) come into play.

The pattern I’m using is literally the same pattern as Higher Order Components (HOCs) in React. Too bad the name doesn’t really make sense in this context, since Swal doesn’t have “Components”.

I’ve also seen these things referred to as “enhancers”, which is where I would place my vote right now… e.g. sweetalert2-enhancer-global-state or sweetalert2-enhancer-form-builder.

There was a bit of prior discussion here: https://github.com/sweetalert2/sweetalert2-react-content/pull/14

Please vote

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
zenflowcommented, Mar 27, 2018

enhancer

0reactions
zenflowcommented, Mar 30, 2018

Alright, perfect!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extension Names
This article contains a few recommendations for naming extensions derived from best practices in the Joomla community. Choosing a Name. Using a Name...
Read more >
TLD List | Domain Name Extensions and Top Level Domains
Search through our complete list of TLDs and find your perfect domain name extension. Explore your new extension with Domain.com.
Read more >
How to Name Your Lash Extension Business - Lash Name Ideas
In this episode of the LivBay Podcast, Mike and Shauna get real on naming your lash business. If you want more content like...
Read more >
What Are the Different Types of Hair Extensions?
Clip-ins, tape-ins, weaves, pre-bonded, fusion, micro-link...what does it all mean? There are so many different styles of extensions and terms, ...
Read more >
GoDaddy's Domain Extensions
ac Now available for registration Register Now academy Now available for registration Register Now accountant Now available for registration Register Now accountants Now available for registration...
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