JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Aug 12, 2021 00:14
I'm gonna add more to the compiler that any JSX that isn't the "embedded HTML document" acts as document.createElement calls, so you could do const div = <div/>... I dunno, just some more sugar here and there.
Aug 12, 2021 00:03
I fought against HTML for quite some time, thinking of ways to replace it. Every alternative I imagined up was just HTML and CSS with different syntax, so I just waited to see where I thought the Web was going, and HTML modules changed my mind to be in favor of an HTML-first approach
Aug 12, 2021 00:02
I do agree that WASM will become further into the forefront in the near future, but I also think that the majority of the web will continue to be driven by HTML
Aug 12, 2021 00:01
And with Web Bundles to wrap it all up, into one or more bundles, it feels a lot more like a native development experience
Aug 12, 2021 00:00
Import maps are another fun one
Aug 12, 2021 00:00
@JBis All of those things are going "native-web"
Aug 11, 2021 23:59
Lots of fun things on the horizon
Aug 11, 2021 23:59
There's also another proposal out there for scoped custom element registries, so each module could define its own local tags for imported components, which helps with naming collisions
Aug 11, 2021 23:58
@KevinB With web components inside of HTML modules, doesn't it replace the need for frameworks like React or Angular altogether? That's my impression, being fairly familiar with the component side of things
Aug 11, 2021 16:33
Once you've fully considered HTML modules, the problem that my compiler solves is allowing you to write type-safe code that compiles directly into valid HTML modules
Aug 11, 2021 16:11
@JBis It's important that you read the proposals I listed in the readme to really understand why.
Aug 11, 2021 14:48
I made a useless thing, tell me how much you love/hate it github.com/ndugger/webmake
May 5, 2021 13:06
They’re too busy not making money to build a proper mobile app
Apr 16, 2021 15:30
MS Paint
Apr 14, 2021 13:13
I have yet to meet someone who gave TypeScript a solid chance and decided that it sucked and they went back to plain javascript. It’s ok to be uninformed, it’s not ok to let that drive your decision making
3
Jul 22, 2020 18:57
but how does the catch know if something was thrown in the try if it's a completely different component?
Jul 22, 2020 18:55
that's a joke btw
Jul 22, 2020 18:55
<If condition={ something }>
    <Try onCatch={ handleCatch }>

    </Try>
</If>
Jul 22, 2020 18:54
just use react and create control flow components
Jul 22, 2020 18:40
I mean, it's a decent language, but I heard the LLVM version suffers from a lot of performance issues
Jul 22, 2020 18:36
same
Jul 22, 2020 18:36
If I ever have to write plain javascript again, I might just throw myself off a bridge. TypeScript, or choose another platform, because plain JS is automatic tech debt
Jul 22, 2020 18:29
We all know JS is a bad language, but the paranoia is your own
Jul 22, 2020 18:25
@Lapys I'll warn you right now, the further you stray from convention in order to create your own, the more difficult it is for other developers to help or even follow your code, because nothing is as they expect, because you've gone and created a whole new way of doing things
Jul 22, 2020 18:19
This is exactly what we were talking about before he came in here, highlights all of the points we were making. I don't have patience for that anymore, or rather I guess I never did.
Jul 22, 2020 18:18
The entitlement is real
Jul 22, 2020 18:16
right
Jul 22, 2020 18:15
Definitely a language barrier
Jul 22, 2020 18:15
This is pretty standard thinking in an enterprise especially, where we don't inherently trust open source code, we always scan it first for known vulnerabilities
Jul 22, 2020 18:14
That is on you. If you don't know the code that a library is running on your machine, then you shouldn't be using that library
Jul 22, 2020 18:13
I am calm, albeit annoyed
Jul 22, 2020 18:12
Glad you modified it, but you should have thought to do that before coming back and falsely claiming that it didn't work
Jul 22, 2020 18:12
And this is exactly what we were talking about, you copy/pasted the code without modifying it and then wondering why it wasn't 100% what you wanted.
Jul 22, 2020 18:09
@Lapys you're introducing an abstraction for no reason. You should be aware of all of the code running in your application (sans extensions), so the idea that native methods will be overwritten without you knowing is pretty silly. Now you have your own abstraction on top of an API which you now also have to document and write tests for, so you're just creating tons more work for yourself without actually providing value, all out of paranoia
Jul 22, 2020 18:07
The changes worked, now carry the code into your application
Jul 22, 2020 18:06
@AlexHunter do you hav e the router link component registered? Are you importing it into codepen?
Jul 22, 2020 18:06
Now modify it to make it work for your exact use case
Jul 22, 2020 18:05
@AlexHunter so it works, great, we agree
Jul 22, 2020 18:05
Yikes, all 3 of your points are pretty bad
Jul 22, 2020 18:05
It's full of really awful advice
Jul 22, 2020 18:05
Oh my god, no, no no
Jul 22, 2020 18:04
what
Jul 22, 2020 18:03
Both JBi and myself modified it in codepen and the changes were reflected, so this is a you problem
Jul 22, 2020 18:03
Thank you for helping to illustrate the point we were making before you entered
Jul 22, 2020 18:02
That is objectively true
Jul 22, 2020 18:02
I never said you were, I said that objectively you copy and pasted it without modifying the anchor tag
Jul 22, 2020 18:00
So you did copy/paste the code without changing the link href, and then asked why the link's href was wrong. You did not modify it, it's the same # as in the answer
Jul 22, 2020 17:59
It does happen, I just changed it and it worked
 

Trash can

Like the recycle bin, but trashier.
Jul 22, 2020 18:17
@AlexHunter name calling is pretty childish, don't you agree?