2 ms·
Whenever any information needs to be saved or processed by the server, you can perform your server-side logic inline in the event handler (e.g. update the datab
by karthikksv 8y ago
Whenever any information needs to be saved or processed by the server, you can perform your server-side logic inline in the event handler (e.g. update the database, contact external services, etc.). There's no need to make an AJAX request and have a corresponding API route. This abstracts away the client-server interface, and you get safety guarantees with type-checking.