DEV Community

loading...

Discussion on: 3 Common Misconceptions about JSX

Collapse
johnmunsch profile image
John Munsch

I'll learn more about esbuild, I'm not familiar with it. You make an excellent point about looking at it from multiple standpoints though. There's the speed aspect of it, "If it were just fast enough not to impede my development cycle would I then care about whether there is a build step or not?"

And I think that for me the answer is, "Yes, kinda..." It's because I've done videos for commercial courses and for YouTube before as well as mentoring some at work and I think that we need to realize there are costs associated with build tools like webpack and Gulp beyond just speed. They become just another speed bump for people who want to develop but get to start with tooling instead. Alternatively they can simply adopt a "CLI" which rolls up a lot of stuff into a huge blob that you can hope never breaks and you never run off the edge of. There is really something to be said for simplicity sometimes.

However with that said, I've used custom elements with only Vanilla JS and then built the exact same components with LitElement (a small amount of additional code to handle templates, attributes, etc.) and I can say I greatly prefer the latter. Stencil, SkateJS, etc. are all just doing variations of that same thing. In fact I really like that variety and I like that JSX is one of those options because it will make a much easier transition for some developers in the future. So sometimes you can absolutely simplify and cut away too much.

Thread Thread
geocine profile image
Aivan Monceller Author • Edited

They become just another speed bump for people who want to develop but get to start with tooling instead.

I agree with this 100% , I haven't done any professional kind of teaching but I love helping others get into web development. This is really a pain, I miss the days where we can just add a script tag and that's it. I think by default libraries/framework must at least provide this option to reduce the technical barrier of learning introduced by build tools. I am glad that the JavaScript community is seeing this a legit problem to solve. Now we have things like ParcelJS and Snowpack. Still it would be a chore to explain why do we even need these, why do we even need to install NodeJS etc.

However with that said, I've used custom elements with only Vanilla JS and then built the exact same components with LitElement (a small amount of additional code to handle templates, attributes, etc.) and I can say I greatly prefer the latter.

I personally prefer DOM events as compared to React's Synthetic events. I think right now though, Web Components are good enough when you are developing the individual components of the application. But If you need to create an entire application with templating, state management, routing , definitely need some help from our other friends on top of the VanillaJS Web Components.

Forem Open with the Forem app