Re:Why is modern web development so complicated?
by jdnenej on Thursday August 08, 2019 @05:01AM
(#20642892)
I built a SPA and found making the API and linking everything up to be needless overhead. The way I find works best is using rails templates to simply insert a div with all the data needed in the attributes and then having react render everything.
Re:Why is modern web development so complicated?
by woutr_be on Wednesday August 14, 2019 @11:11PM
(#20702273)
That's what we used to do years ago, just render a script tag with all the data required, and then use JavaScript to link it up in the views. But I feel if that's what you're doing, you might as well use a templating engine, and put all the data where it belongs.
In most of my personal projects I've been following this approach too, and I must say, I'm so much more productive. I don't find myself constantly switching between browser-, terminal and VS Code-windows. I don't have to do validation twice anymore, and know perfectly where all my data is coming from.