2 ms·
You can post data to API endpoints with vanilla JS fairly easily now. There are a lot of simplifying cases where there's no complexity to state management - lik
by whatshisface 4y ago
You can post data to API endpoints with vanilla JS fairly easily now. There are a lot of simplifying cases where there's no complexity to state management - like when the data flow is one-way.
- robertoandred 4y agoSimply posting data isn't an issue. It's just as easy to do that in a 100% client-side JS app. The problem is what happens next. Do you reload the entire page each time the user makes any kind of change?
- whatshisface 4y agoIf your input is just a text box, you can post it whenever it is submitted and put up some kind of status gleaned from the server's response body. In another comment, I point out how easy it is for requirements to end up forcing you out of the stateless happy path of frameworkless frontend, but that doesn't mean there aren't a lot of cases where you can stay in it.