3 ms·
As someone not at all familiar with modern JS: why the hell would a UI library have a key of any kind??
by franga2000 6y ago
As someone not at all familiar with modern JS: why the hell would a UI library have a key of any kind??
- aethertron 6y agoNot a crypto key (I hope). In JS, objects (dictionaries) are key-value pairs.
- franga2000 6y agoFair enough, and I see how "private" might mean "inaccessible" and not "secret" as I originally assumed. I hope at least...
- scaladev 6y agoBecause there are some really terrible projects out there made by guys who think that a two week "bootcamp" is enough to make you a competent developer. An SPA needs to access a third party resource of some sort (in my case it was Power BI), and fetching the necessary authentication information from your server with proper authorization is apparently too complicated. I ain't rewriting that shit, I have too much work already.
- eyelidlessness 6y agoI meant... a property name. Like `{ [key]: value }`
- franga2000 6y agoYeah, that makes sense. I automatically assumed you were talking about "secret" keys because of the parent post.
- philplckthun 6y agoIt's not a cryptographic key or a secret of any kind. In the case of React (or other JS libraries) export identifiers are chosen to expose private APIs for integration purposes with things like developer tooling and other functionality that isn't part of the publicly documented API. Instead of choosing something like `__PRIVATE` the React library in particular chose something more eye catching: `__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`, which is definitely sure to get people's attention when they look into it, but is essentially just a joke.