4 ms·
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
by jdnenej 7y ago
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.
- woutr_be 7y agoThat'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.