Is it possible to create reusable formula blocks?

Hi guys,

We have a web application which consists of a backend rest api providing endpoints to a react frontend app. We started using coda as a second frontend app for some simple workflows, so what coda basically does is consume our backend endpoints through coda pack formulas and populate the coda tables, the coda pack makes the api call, and we act on the response using the coda built-in formulas like AddRow etc.

I started noticing too many logic repetition for adding/modifying/deleting rows. since we have tables for multiple types of resources, a lot of the same logic ends up being duplicated all over the document.

Is there a way to “centralize” formulas in a way that they can be parameterized like functions?
I’ve considered moving this CRUD logic to the pack formula level so I could use javascript, but I’ve read it is not recommended to make requests to coda api from coda packs.

Any suggestions? Thanks a lot.