You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah I also lean towards only the default. We're not going to gain anything from treeshaking in the lib, so named exports only breaks and renames the API for little if any benefit.
Following es export ( #275 ) there's the possibility to use named exports instead of exporting the whole API in the default export.
As already cited there are some challenges doing so.
The bigger is that the most common usage pattern is
Changing to named exports would require Radio users to convert code in a lot of places
Also there would need to reevaluate the API design a bit to allow current features (override log) or avoid confusion (
channel
vsChannel
)Here's a quick proposal of an API for implementing named exports
Keep same signature:
Channel
tuneIn
tuneOut
reset
Changes:
channel
>getChannel
DEBUG
>setDebug(Boolean)
debugLog
>setDebugHandler(Function)
By now, in short term, i bias toward keeping only the default export, and evaluate the named exports for the future
The text was updated successfully, but these errors were encountered: