Fork me on GitHub

@thosmos don’t think either one is going to work. You have two basic choices I think: Write a configurable component whose info sits in state, or a macro…both defsc and sc are macros, so they’d expand before the bits you’re passing arrive.


Be glad to chat more over ideas that would


ok i see, yes I'm forgetting about the macro stage


I think the configurable component with info in state sounds like it


I see the destructure of the computed arg would only come from the call to the factory, whereas my pseudo code assumes they'd be available during the macro compilation phase. think I got it


@thosmos Are you using forms-state?


remember that you can pull the form fields from the defsc’s declaration of them, and with a bit more declared “schema” it would not be too hard to make reusable functions that could be given this and a field and render the rest…with a bit more info, I could imagine a reusable function that could render the entire form as a single call.


the query and form-fields are “static”, so they can also be statically analyzed before component mounts…you can walk the query and find forms, etc.