karax icon indicating copy to clipboard operation
karax copied to clipboard

move setRenderer for ssr to vdom.nim

Open bung87 opened this issue 3 years ago • 10 comments

bung87 avatar Jun 04 '21 07:06 bung87

move to bigger patch https://github.com/karaxnim/karax/pull/208

bung87 avatar Jun 04 '21 10:06 bung87

What is the goal of this PR? setRenderer does not belong to vdom.nim

Araq avatar Jul 31 '21 07:07 Araq

karax.nim import js target only module, that will cause compile time error, so I move to vdom.nim

bung87 avatar Jul 31 '21 07:07 bung87

Can you move it into its own module instead?

Araq avatar Jul 31 '21 12:07 Araq

so user need import extro module, what's the module name ? I have no idea.

bung87 avatar Jul 31 '21 13:07 bung87

I just realized that I don't understand the purpose of setRenderer so I cannot give you good advice to where it belongs.

Araq avatar Aug 11 '21 13:08 Araq

it renders to c backend and generate html to a relative path.

bung87 avatar Aug 11 '21 13:08 bung87

Then it should be renamed to something else and vdom can contain it.

Araq avatar Aug 11 '21 14:08 Araq

so what it should be named ?

bung87 avatar Aug 12 '21 17:08 bung87


proc renderToFile*(file: string; renderer: proc (): VNode)

No command line handling required.

Araq avatar Aug 12 '21 18:08 Araq

@bung87 do you want to implement the proposed name change (and deprecate the old one) or should we close this PR?

geotre avatar Mar 02 '23 23:03 geotre

I'm going to close this for now, but please let me know if you want to reopen it @bung87

geotre avatar Mar 23 '23 15:03 geotre