karax
karax copied to clipboard
move setRenderer for ssr to vdom.nim
move to bigger patch https://github.com/karaxnim/karax/pull/208
What is the goal of this PR? setRenderer does not belong to vdom.nim
karax.nim import js target only module, that will cause compile time error, so I move to vdom.nim
Can you move it into its own module instead?
so user need import extro module, what's the module name ? I have no idea.
I just realized that I don't understand the purpose of setRenderer
so I cannot give you good advice to where it belongs.
it renders to c backend and generate html to a relative path.
Then it should be renamed to something else and vdom can contain it.
so what it should be named ?
proc renderToFile*(file: string; renderer: proc (): VNode)
No command line handling required.
@bung87 do you want to implement the proposed name change (and deprecate the old one) or should we close this PR?
I'm going to close this for now, but please let me know if you want to reopen it @bung87