right now, if you want to do RPC in vecty, you have to:
call an event handler in your template
make the event handler call and RPC endpoint
get data back
re-render the template with the data
it would be nice if you could put a {vecty-rpc: MyRPCMethod} into your template like this:
<a onclick="{vecty-rpc:MyRPCMethod}" data-target="someid">Click Here!</a>
<div id="someid">Here's where the RPC return data goes</div>
And have factor generate code or dynamically call the RPC method when the click event happens. Then, when the RPC data comes back, it would populate the <div id="someid"> tag with the return data.
right now, if you want to do RPC in vecty, you have to:
it would be nice if you could put a
{vecty-rpc: MyRPCMethod}
into your template like this:And have
factor
generate code or dynamically call the RPC method when the click event happens. Then, when the RPC data comes back, it would populate the<div id="someid">
tag with the return data.