3 ms·
Vanilla. Otherwise you will end up building the hypothetical nuclear reactor used in the story to explain bike shedding. If your goal was to be a long term corp
by austin-cheney 2y ago
Vanilla. Otherwise you will end up building the hypothetical nuclear reactor used in the story to explain bike shedding. If your goal was to be a long term corporate imposter then I would recommend React and a bunch of other bullshit, but you don’t that time.
You need to focus on delivering the end product and not some teck stack learning journey.
Just keep it ridiculously simple on the front end and you should be vaguely fine, security and accessibility not withstanding.
User interactions -> events -> event handlers -> listeners. If there is no third party code in your application you can skip the listeners if you want and it would make your application dramatically more simple.
Use of messaging via web sockets will also dramatically reduce complexity in your app down the line from an architecture perspective, but if that requires more than a day and half to execute and scale on the front end then don’t do it.
Finally, understand the spirit of the language: lexical scope, functions as first class citizens, data structures, event loop. This is the most important part. If you are not immediately comfortable with these concepts you are in deep trouble and should pay someone else to do this work.
- ldjkfkdsjnv 2y agoVanilla javascript is a completely different skill set than modern react frameworks, its a waste of time
- austin-cheney 2y agoI strongly disagree after writing JS full time, and as a hobby, for 15 years. Normally when people argue against vanilla JS it’s because they never learned to write original applications (in any language), or if they are in management it’s just more expedient to churn through employees than train them to program. Either way the OP has to both learn and deliver a product in a short time frame. It just makes more sense to cut out all the unnecessary bullshit developers use to compensate with.
- solardev 2y agoIMO neither one is necessarily better; they're just different levels of abstraction. React lets you think and work in components more easily. Vanilla has a much closer to the metal events and interactivity model. I think it's way quicker to put out a MVP with a good UI framework (something like MUI or Chakra or Ant) than to spend a lot of time building up primitives from scratch. It's like the difference between writing Visual Basic and C++ or whatever. Different use cases. Without knowing what the OP is actually trying to build, it's hard to say what's more suitable. I wouldn't necessarily default to vanilla OR React. It really just depends.
- Woshiwuja 2y agowhat kind of take is this, what do you think react was made with? if react isnt used anymore does your skillset translate?
- ldjkfkdsjnv 2y agoI'm not going to learn assembly to program in c, and especially not as a beginner.
- austin-cheney 2y agoJavaScript is not assembly. It’s like saying I am not going to learn the rules of driving before driving a car because I’m just a driver, not a lawyer. I was in that line of work long enough and have heard that false analogy enough to know that it’s people pretending to be arrogant to distract from their stupidity. Rephrased its really just: I shouldn’t have to form of whining because they never learned in the first place and are embarrassed by what super beginner things they absolutely cannot do.
- Woshiwuja 2y agoare you never gonna write js inside a react component?
- briangray 2y agoSeconding this. Not as a qualified frontend dev, but as a backend dev forced to learn frontend in a short time frame. Work required some frontend tools with no devs available and I was assigned the work. The folks who would usually do that work were pushing me towards React, Vue, and Jquery solutions. I took a look at each, knew I would be responsible for understanding and maintaining the whole systems, and went with vanilla HTML, CSS, and JS instead. Started out returning simple pages. Added styling to meet requirements. A lot of it was embedded in <style> tags until I found a way to organize it into separate classes. Then added JS for event handlers, listeners, and scripting the simple the pieces that needed to be automated. That system has been running in production for years now. New features and bugs are easy for me to identify and add or resolve. It's also given me a solid base understanding to migrate components to JQuery and build other systems in required framework. Zero regrets about that choice. It was simple to learn, quick to build, and solid.