r/programming • u/fagnerbrack • Dec 23 '19
Vanilla JavaScript and HTML - No frameworks. No libraries. No problem.
https://johnpapa.net/render-html-2/11
u/fuckin_ziggurats Dec 24 '19
Did everyone forgot how front-end-heavy projects looked under the hood before the JS frameworks came out? I feel like we're in a constant loop.
No problem? What kind of an arrogant douche writes this sort of article? I still have PTSD from 6 years ago and you're not taking me back, ever! I'm expecting him to try KnockoutJS next year, no problem! Just keep reinventing the same thing.
8
Dec 24 '19
I feel like we're in a constant loop.
Web development has been in a loop since the 90s. Look up what Adobe Flex code used to look like back in the 00s. It doesn't look much different than React.
2
4
-7
u/samikroon Dec 23 '19
Stopped reading at:
"One way to do this is to reference an existing element that will contain them. Another way is to reference an element and replace that element with the new content."
What about toggling on or off a class (you could name this class "hidden") which has the property: display: none;
6
u/involutionn Dec 24 '19
And??? Why would you stop reading?
Your (very basic) way can work well for certain cases, for others it’s completely infeasible. Why would only showing a few of the multitude of options make you stop reading?
2
17
u/Zonarius Dec 24 '19
Then goes on using Typescript