Closed marcofugaro closed 5 years ago
Agreed they should match. Do you think maybe the examples should be modified to match the UMD name rather than the other way around? My only concern is just that State
might be generic enough for annoying ambiguity or name collisions.
I honestly think ControlsState
is a way too long name to use and prefer just the simple State
😅
True, State might me more generic, however I think it's not really common for libraries to expose a State to the window, it might be the user that has a State variable, but I think he would be to understand the name collisions, also we're talking about only of the browser environment, most of the developers use bundlers.
Sorry I've been slow on this, @marcofugaro! I think you're right about prioritizing convenience for the standalone version since most developers use bundlers and can choose the name anyway 👍
Nice, should we merge this? 😅
WIth the current version, when you use
controls-state
from the browser via a script tag (for example in a codepen usinghttps://unpkg.com/controls-state@1.1.1/dist/controls-state.min.js
) you have to writeControlsState
instead ofState
like it is in the examples.This PR fixes it by changing the UMD name to
State