This is awesome! And is precisely how I use unpoly.js as well. ![]()
This could be quite useful indeed. ![]()
For note, if you want a reference of how things work, when someone clicks on, say, a button on one of my unpoly decorated pages, that element also has a decoration on it to say what it effects (which can be multiple, specific updates, etc…) and that information is sent to the server as well. My phoenix templates by default re-render everything and send the entire page to unpoly, then it picks and chooses out of that what to put in. However, using the information of ‘what’ it wants to update I can re-render only parts of the page, calculating only part of the data I need (perhaps excepting some very costly database calls for example) then just send the parts back that it wants (or more, or even less, whichever) and it stitches it together on the front-end. If no javascript on the browser they are using then full pages are reloaded as normal. ![]()


















