> You just define a function and call it, very nice.
What do you do when you change the action API (arguments / return type) and deploy? What happens with browsers still having the old code that assumes the old contract?
Pretty much the same as dealing with traditional API versioning. You can version the functions themselves, or put a version in they payload and return an error telling the user to refresh.
How do you version the functions? How does the server determine which function to call? Does it use the name of the function, or its source code file, or something else? If I rename the old version and call it `actionOld` while the new version is `action` will it know how to call the old one, or do I need to do the opposite (call it `actionNew`)? What if I move the old one to a different file?
You can use a v1 folder for your v1 functions. The server identifies functions by path and name of the action. Similar to a url. So like a url if you want a new one, you'd create actionNew, and if you move the location of the function it would break old versions without a redirect.